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
  • Click Event and Listener

Click Event and Listener · Changes

Page history
Updated Click Event and Listener (markdown) authored Mar 28, 2017 by Weiping Huang's avatar Weiping Huang
Hide whitespace changes
Inline Side-by-side
Click-Event-and-Listener.md
View page @ 2787e7b7
Listener for clicking each button or animation-states. Check the [demo](https://github.com/Nightonke/BoomMenu/blob/master/app/src/main/java/com/nightonke/boommenusample/ListenerActivity.java) for more details.
###Listener in Each Builder
### Listener in Each Builder
You can add a simple listener for each boom-button by adding listeners to each builder of them.
```
for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
......@@ -16,7 +16,7 @@ for (int i = 0; i < bmb.getPiecePlaceEnum().pieceNumber(); i++) {
}
```
###Listener for BMB
### Listener for BMB
If you want to manager all the click events in a method, you can use `OnBoomListener` / `OnBoomListenerAdapter`:
```
// Use OnBoomListener to listen all methods
......@@ -65,14 +65,14 @@ bmb.setOnBoomListener(new OnBoomListenerAdapter() {
});
```
###State of BMB
### State of BMB
Get the states of BMB by:
```
bmb.isBoomed(); // Whether the BMB is boomed.
bmb.isReBoomed(); // Whether the BMB is re-boomed.
```
###Re-boom BMB When Back-Button is Clicked
### Re-boom BMB When Back-Button is Clicked
BMB will re-boom when it's boomed and back-button is clicked. If you don't want this happen:
```
bmb.setBackPressListened(false);
......
Clone repository
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. Different Order for Buttons
  11. Other Animations Attributes for Buttons
  12. Click Event and Listener
  13. Control BMB
  14. Use BMB in Action Bar
  15. Use BMB in List
  16. Use BMB in Fragment
  17. Attributes for BMB or Pieces on BMB
  18. Cache Optimization & Boom Area
  19. Version History
  20. Structure for BMB