Skip to content

Cache Optimization & Boom Area

Weiping Huang edited this page Mar 28, 2017 · 3 revisions

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 or 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"

Boom-buttons in left picture are in whole screen, and the rights are just in their parent-view(the fragment below action-bar).