Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B BoomMenu
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 114
    • Issues 114
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • 黄伟平
  • BoomMenu
  • Wiki
  • Button Place Alignments

Button Place Alignments · Changes

Page history
Updated Button Place Alignments (markdown) authored Dec 11, 2016 by Weiping Huang's avatar Weiping Huang
Hide whitespace changes
Inline Side-by-side
Button-Place-Alignments.md
View page @ a10fcfa9
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
Clone repository

#####Documentation Chapters

  1. Basic Usage
  2. Simple Circle Button
  3. Text Inside Circle Button
  4. Text Outside Circle Button
  5. Ham Button
  6. Share Style
  7. Button Place Alignments
  8. Different Ways to Boom
  9. Ease Animations for Buttons
  10. Other Animations Attributes for Buttons
  11. Click Event and Listener
  12. Control BMB
  13. Use BMB in Action Bar
  14. Use BMB in List
  15. Use BMB in Fragment
  16. Attributes for BMB or Pieces on BMB
  17. Cache Optimization & Boom Area
  18. Structure for BMB