-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Button Place Alignments
Weiping Huang edited this page Mar 28, 2017
·
3 revisions
Place all the buttons to anywhere on screen.
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:
- ButtonPlaceAlignmentEnum.Center(in .java) or buttonPlaceAlignment_center(in .xml)
Center. - ButtonPlaceAlignmentEnum.Top(in .java) or buttonPlaceAlignment_top(in .xml)
Top. - ButtonPlaceAlignmentEnum.Bottom(in .java) or buttonPlaceAlignment_bottom(in .xml)
Bottom. - ButtonPlaceAlignmentEnum.Left(in .java) or buttonPlaceAlignment_left(in .xml)
Left. - ButtonPlaceAlignmentEnum.Right(in .java) or buttonPlaceAlignment_right(in .xml)
Right. - ButtonPlaceAlignmentEnum.TL(in .java) or buttonPlaceAlignment_tl(in .xml)
Top-Left. - ButtonPlaceAlignmentEnum.TR(in .java) or buttonPlaceAlignment_tr(in .xml)
Top-Right. - ButtonPlaceAlignmentEnum.BL(in .java) or buttonPlaceAlignment_bl(in .xml)
Bottom-Left. - ButtonPlaceAlignmentEnum.BR(in .java) or buttonPlaceAlignment_br(in .xml)
Bottom-Right.
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"
- Basic Usage
- Simple Circle Button
- Text Inside Circle Button
- Text Outside Circle Button
- Ham Button
- Share Style
- Custom Position
- Button Place Alignments
- Different Ways to Boom
- Ease Animations for Buttons
- Different Order for Buttons
- Other Animations Attributes for Buttons
- Click Event and Listener
- Control BMB
- Use BMB in Action Bar
- Use BMB in Tool Bar
- Use BMB in List
- Use BMB in Fragment
- Attributes for BMB or Pieces on BMB
- Cache Optimization & Boom Area
- Change Boom Buttons Dynamically
- Fade Views
- Version History
- Structure for BMB