|
|
Place all the buttons to left or to bottom on screen.
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-enum/text-outside-circle-button/vertical.png">
|
|
|
|
|
|
Place all the buttons to anywhere on screen.
|
|
|
|
|
|
###Button Place Alignments
|
|
|
In version 2.0.0 or above, the place-alignment of boom-buttons on the screen(or its parent-view) is able to customized. This is helpful when BMB is used in pad(picture above). You can set this attribute by:
|
|
|
```
|
|
|
bmb.setButtonPlaceAlignmentEnum(ButtonPlaceAlignmentEnum.BL);
|
|
|
```
|
|
|
Or in .xml:
|
|
|
```
|
|
|
app:bmb_buttonPlaceAlignmentEnum="buttonPlaceAlignment_bl"
|
|
|
```
|
|
|
|
|
|
The meanings of each button-place-alignment-enum:
|
|
|
|
|
|
1. ButtonPlaceAlignmentEnum.Center(in .java) or buttonPlaceAlignment_center(in .xml)
|
|
|
Center.
|
|
|
2. ButtonPlaceAlignmentEnum.Top(in .java) or buttonPlaceAlignment_top(in .xml)
|
|
|
Top.
|
|
|
3. ButtonPlaceAlignmentEnum.Bottom(in .java) or buttonPlaceAlignment_bottom(in .xml)
|
|
|
Bottom.
|
|
|
4. ButtonPlaceAlignmentEnum.Left(in .java) or buttonPlaceAlignment_left(in .xml)
|
|
|
Left.
|
|
|
5. ButtonPlaceAlignmentEnum.Right(in .java) or buttonPlaceAlignment_right(in .xml)
|
|
|
Right.
|
|
|
6. ButtonPlaceAlignmentEnum.TL(in .java) or buttonPlaceAlignment_tl(in .xml)
|
|
|
Top-Left.
|
|
|
7. ButtonPlaceAlignmentEnum.TR(in .java) or buttonPlaceAlignment_tr(in .xml)
|
|
|
Top-Right.
|
|
|
8. ButtonPlaceAlignmentEnum.BL(in .java) or buttonPlaceAlignment_bl(in .xml)
|
|
|
Bottom-Left.
|
|
|
9. ButtonPlaceAlignmentEnum.BR(in .java) or buttonPlaceAlignment_br(in .xml)
|
|
|
Bottom-Right.
|
|
|
|
|
|
###More Accurate
|
|
|
Boom-buttons is able to customize the margin between surroundings. For example:
|
|
|
```
|
|
|
bmb.setButtonTopMargin(10);
|
|
|
bmb.setButtonBottomMargin(10);
|
|
|
bmb.setButtonLeftMargin(10);
|
|
|
bmb.setButtonRightMargin(10);
|
|
|
```
|
|
|
Or in .xml:
|
|
|
```
|
|
|
app:bmb_buttonTopMargin="1dp"
|
|
|
app:bmb_buttonBottomMargin="1dp"
|
|
|
app:bmb_buttonLeftMargin="1dp"
|
|
|
app:bmb_buttonRightMargin="1dp"
|
|
|
```
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-alignment-enum/button-place-alignment-1.png" width="200">
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-alignment-enum/button-place-alignment-2.png" width="200">
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/button-place-alignment-enum/button-place-alignment-3.png" width="200"> |
|
|
\ No newline at end of file |