... | ... | @@ -19,7 +19,16 @@ Add BMB in .xml file. |
|
|
You can set button-enum, piece-place-enum and button-place-enum in .xml file with attributes or in .java file with setters. For more information and pictures about [piece-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Text-Outside-Circle-Button#piece-place-enum-for-text-outside-circle-button) and [button-place-enum](https://github.com/Nightonke/BoomMenu/wiki/Text-Outside-Circle-Button#button-place-enum-for-text-outside-circle-button), check the tables below.
|
|
|
|
|
|
###Add Builders
|
|
|
The builder of text outside circle button has lots of methods to customize the boom-buttons.
|
|
|
The builder of text outside circle button has lots of methods to customize the boom-buttons. **Needn't to set every attributes for boom-buttons, just customize what you want.** For example:
|
|
|
```
|
|
|
for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
|
|
|
TextOutsideCircleButton.Builder builder = new TextOutsideCircleButton.Builder()
|
|
|
.normalImageRes(R.drawable.butterfly)
|
|
|
.normalText("Butter Doesn't fly!");
|
|
|
bmb.addBuilder(builder);
|
|
|
}
|
|
|
```
|
|
|
But if you wanna customize more attributes:
|
|
|
```
|
|
|
for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
|
|
|
TextOutsideCircleButton.Builder builder = new TextOutsideCircleButton.Builder()
|
... | ... | @@ -160,15 +169,6 @@ for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) { |
|
|
bmb.addBuilder(builder);
|
|
|
}
|
|
|
```
|
|
|
**Needn't to set every attributes for boom-buttons, just customize what you want.** For example:
|
|
|
```
|
|
|
for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
|
|
|
TextOutsideCircleButton.Builder builder = new TextOutsideCircleButton.Builder()
|
|
|
.normalImageRes(R.drawable.butterfly)
|
|
|
.normalText("Butter Doesn't fly!");
|
|
|
bmb.addBuilder(builder);
|
|
|
}
|
|
|
```
|
|
|
After adding builders to BMB, it is ready for a boom.
|
|
|
|
|
|
### Piece Place Enum for Text Outside Circle Button
|
... | ... | |