|
|
What if I want BMB to boom in just its parent-view?
|
|
|
|
|
|
###Cache Optimization
|
|
|
In BMB, cache optimization is apply for avoiding re-create boom-buttons every time it booms. With cache optimization, boom-buttons will not be removed so that they are not necessary to re-create, which can optimize the resource. The default value for cache optimization is true, you can turn it off by:
|
|
|
```
|
|
|
bmb.setCacheOptimization(false);
|
|
|
```
|
|
|
Or in .xml:
|
|
|
```
|
|
|
app:bmb_cacheOptimization="false"
|
|
|
```
|
|
|
Notice that when bmb is used [in fragment](https://github.com/Nightonke/BoomMenu/wiki/Use-BMB-in-Fragment) or [in list](https://github.com/Nightonke/BoomMenu/wiki/Use-BMB-in-List)(list-view/recycler-view), cache optimization is turned off automatically.
|
|
|
|
|
|
###Boom Area
|
|
|
Sometimes, maybe you want bmb to boom in its parent-view. Use the following code to do that:
|
|
|
```
|
|
|
bmb1.setBoomInWholeScreen(false);
|
|
|
```
|
|
|
Or in .xml:
|
|
|
```
|
|
|
app:bmb_boomInWholeScreen="false"
|
|
|
```
|
|
|
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/whole-screen/whole-screen-true.png" width="300">
|
|
|
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/whole-screen/whole-screen-false.png" width="300">
|
|
|
|
|
|
Boom-buttons in left picture are in whole screen, and the rights are just in their parent-view(the fragment below action-bar). |
|
|
\ No newline at end of file |