Boom Demo in Android

package com.example.deep.firstapp;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import com.hitomi.cmlibrary.CircleMenu;
import com.hitomi.cmlibrary.OnMenuSelectedListener; 
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
CircleMenu cm = findViewById(R.id.circle_menu);
cm.setMainMenu(Color.parseColor("#0B6121"), R.mipmap.ic_launcher, R.mipmap.ic_launcher);
cm.addSubMenu(Color.parseColor("#0B6121"), R.drawable.b1)
.addSubMenu(Color.parseColor("#0B6121"), R.drawable.b1)
.addSubMenu(Color.parseColor("#0B6121"), R.drawable.b1)
.addSubMenu(Color.parseColor("#0B6121"), R.drawable.b1)
.addSubMenu(Color.parseColor("#0B6121"), R.drawable.b1);
cm.setOnMenuSelectedListener(new OnMenuSelectedListener() {
@Override
public void onMenuSelected(int i) {
switch (i) {
case 0:
Toast.makeText(MainActivity.this, "First1", Toast.LENGTH_SHORT).show();
break;
case 1:
Toast.makeText(MainActivity.this, "First2", Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(MainActivity.this, "First3", Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(MainActivity.this, "First4", Toast.LENGTH_SHORT).show();
break;
case 4:
Toast.makeText(MainActivity.this, "First5", Toast.LENGTH_SHORT).show();
break;
}
}
});
}
}

         ______________________________________________________________________

< ?xml version="1.0" encoding="utf-8"?>
< RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.deep.firstapp.MainActivity">
< com.hitomi.cmlibrary.CircleMenu
android:id="@+id/circle_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"/>

< /RelativeLayout>

         ___________________________________________________________________________


apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.deep.firstapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.github.Hitomis:CircleMenu:v1.0.0'
implementation 'com.android.support:design:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
          ________________________________________________________________________

       



No comments: