|
How to change the size or margins of dots on BMB?
|
|
How to change the size or margins of dots on BMB?
|
|
|
|
|
|
|
|
###Attributes for BMB
|
|
|
|
We always talk about the attributes for boom-buttons of BMB, how about BMB itself?
|
|
|
|
|
|
|
|
####For BMB Itself
|
|
|
|
For shadow:
|
|
|
|
```
|
|
|
|
bmb.setShadowEffect(true);
|
|
|
|
bmb.setShadowColor(Color.parseColor("#55000000"));
|
|
|
|
bmb.setShadowOffsetX(20);
|
|
|
|
bmb.setShadowOffsetY(20);
|
|
|
|
bmb.setShadowRadius(10);
|
|
|
|
```
|
|
|
|
Or in .xml:
|
|
|
|
```
|
|
|
|
app:bmb_shadowEffect="true"
|
|
|
|
app:bmb_shadowColor="#55000000"
|
|
|
|
app:bmb_shadowOffsetX="5dp"
|
|
|
|
app:bmb_shadowOffsetY="5dp"
|
|
|
|
app:bmb_shadowRadius="10dp"
|
|
|
|
```
|
|
|
|
For BMB:
|
|
|
|
```
|
|
|
|
bmb.setButtonRadius(Util.dp2px(40));
|
|
|
|
bmb.setRippleEffect(false);
|
|
|
|
bmb.setNormalColor(Color.BLACK);
|
|
|
|
bmb.setHighlightedColor(Color.BLUE);
|
|
|
|
bmb.setUnableColor(Color.WHITE);
|
|
|
|
```
|
|
|
|
Or in .xml:
|
|
|
|
```
|
|
|
|
app:bmb_buttonRadius="40dp"
|
|
|
|
app:bmb_rippleEffect="true"
|
|
|
|
app:bmb_normalColor="@android:color/holo_blue_light"
|
|
|
|
app:bmb_highlightedColor="@android:color/holo_blue_dark"
|
|
|
|
app:bmb_unableColor="@android:color/white"
|
|
|
|
```
|
|
|
|
|
|
|
|
####For Pieces on BMB
|
|
|
|
For pieces lay on BMB:
|
|
|
|
```
|
|
|
|
bmb.setDotRadius(10);
|
|
|
|
bmb.setHamWidth(80);
|
|
|
|
bmb.setHamHeight(20);
|
|
|
|
bmb.setPieceHorizontalMargin(10);
|
|
|
|
bmb.setPieceVerticalMargin(10);
|
|
|
|
bmb.setPieceInclinedMargin(20);
|
|
|
|
```
|
|
|
|
Or in .xml:
|
|
|
|
```
|
|
|
|
app:bmb_dotRadius="5dp"
|
|
|
|
app:bmb_hamWidth="40dp"
|
|
|
|
app:bmb_hamHeight="5dp"
|
|
|
|
app:bmb_pieceHorizontalMargin="5dp"
|
|
|
|
app:bmb_pieceVerticalMargin="5dp"
|
|
|
|
app:bmb_pieceInclinedMargin="5dp"
|
|
|
|
```
|
|
|
|
|
|
|
|
####For Boom-Buttons on BMB
|
|
|
|
```
|
|
|
|
bmb.setButtonHorizontalMargin(50);
|
|
|
|
bmb.setButtonVerticalMargin(40);
|
|
|
|
bmb.setButtonInclinedMargin(100);
|
|
|
|
```
|
|
|
|
Or in .xml:
|
|
|
|
```
|
|
|
|
app:bmb_buttonHorizontalMargin="20dp"
|
|
|
|
app:bmb_buttonVerticalMargin="20dp"
|
|
|
|
app:bmb_buttonInclinedMargin="30dp"
|
|
|
|
``` |
|
|
|
\ No newline at end of file |