|
|
This chapter covers the basic setup for using this library.
|
|
|
|
|
|
###Creating BMB
|
|
|
|
|
|
Add BMB in .xml file.
|
|
|
|
|
|
```
|
|
|
<com.nightonke.boommenu.BoomMenuButton
|
|
|
android:id="@+id/bmb"
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="wrap_content"
|
|
|
/>
|
|
|
```
|
|
|
|
|
|
Then in .java file, find your BMB and set some attributes for it.
|
|
|
|
|
|
```
|
|
|
BoomMenuButton bmb = (BoomMenuButton) findViewById(R.id.bmb);
|
|
|
```
|
|
|
|
|
|
Set button-enum for BMB, button-enum tells which kind of boom-button(the sub-buttons when booming) that you want.
|
|
|
|
|
|
1. `ButtonEnum.SimpleCircle` corresponding to [Simple Circle Button]()
|
|
|
|
|
|
```
|
|
|
bmb.setButtonEnum(ButtonEnum.SimpleCircle);
|
|
|
```
|
|
|
bmb.setButtonEnum(ButtonEnum.SimpleCircle);
|
|
|
bmb.setPiecePlaceEnum(PiecePlaceEnum.DOT_1);
|
|
|
bmb.setButtonPlaceEnum(ButtonPlaceEnum.SC_1);
|
|
|
``` |
|
|
\ No newline at end of file |