|
|
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);
|
... | ... | |