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
  • Basic Usage

Basic Usage · Changes

Page history
Updated Basic Usage (markdown) authored Dec 10, 2016 by Weiping Huang's avatar Weiping Huang
Hide whitespace changes
Inline Side-by-side
Basic-Usage.md
View page @ f1a3ba78
...@@ -28,18 +28,32 @@ Set button-enum for BMB, button-enum tells which kind of boom-button(the sub-but ...@@ -28,18 +28,32 @@ Set button-enum for BMB, button-enum tells which kind of boom-button(the sub-but
``` ```
bmb.setButtonEnum(ButtonEnum.SimpleCircle); bmb.setButtonEnum(ButtonEnum.SimpleCircle);
``` ```
Or in .xml:
1. `app:bmb_buttonEnum="simpleCircle"`
2. `app:bmb_buttonEnum="textInsideCircle"`
3. `app:bmb_buttonEnum="textOutsideCircle"`
4. `app:bmb_buttonEnum="ham"`
Then you need to tell BMB how it should place pieces on itself. Click the links for 4 kinds of buttons above to check different piece-place-enums. Then you need to tell BMB how it should place pieces on itself. Click the links for 4 kinds of buttons above to check different piece-place-enums.
``` ```
bmb.setPiecePlaceEnum(PiecePlaceEnum.DOT_3_1); bmb.setPiecePlaceEnum(PiecePlaceEnum.DOT_3_1);
``` ```
Or in .xml:
```
app:bmb_piecePlaceEnum="piecePlace_dot_3_1"
```
Now tell BMB how to place the buttons on the screen when booming. Click the links for 4 kinds of buttons above to check different button-place-enums. Now tell BMB how to place the buttons on the screen when booming. Click the links for 4 kinds of buttons above to check different button-place-enums.
``` ```
bmb.setButtonPlaceEnum(ButtonPlaceEnum.SC_3_3); bmb.setButtonPlaceEnum(ButtonPlaceEnum.SC_3_3);
``` ```
Or in .xml:
```
app:bmb_buttonPlaceEnum="buttonPlace_sc_3_3"
```
###Add Builders ###Add Builders
You have set attributes for BMB itself, now add builders for customizing boom-buttons to BMB. There are 4 different builders for the 4 kinds of boom-buttons above. For instance, use `SimpleCircleButton.Builder` for `ButtonEnum.SimpleCircle`. Click the links for 4 kinds of buttons above to find out how to use builders. You have set attributes for BMB itself, now add builders for customizing boom-buttons to BMB. There are 4 different builders for the 4 kinds of boom-buttons above. For instance, use `SimpleCircleButton.Builder` for `ButtonEnum.SimpleCircle`. Click the links for 4 kinds of buttons above to find out how to use builders.
......
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