Skip to content

Other Animations Attributes for Buttons

Weiping Huang edited this page Jun 21, 2017 · 6 revisions

Delay, duration, rotate-degrees, frames...

Other Animation Attributes

Set other animation attributes by:

bmb.setShowDelay(0);
bmb.setShowDuration(1000);
bmb.setRotateDegree(1080);
bmb.setHideDelay(0);
bmb.setHideDuration(500);
bmb.setFrames(80);  // The higher, the smoother animations the higher performances needed

Or in .xml:

app:bmb_showDelay="0"
app:bmb_showDuration="1000"
app:bmb_rotateDegree="1080"
app:bmb_hideDelay="0"
app:bmb_hideDuration="500"
app:bmb_frames="60"

Cancelable and Auto-Hide

If the cancelable property of BMB is true, then when after the boom animation of booming, you can re-boom BMB by clicking the background.

If the autoHide property of BMB is true, then when after the boom animation of booming, you can click one of the boom-buttons to re-boom BMB.

bmb.setCancelable(false);
bmb.setAutoHide(false);

Or in .xml:

app:bmb_cancelable="false"
app:bmb_autoHide="false"

3D Animation

From version 2.1.0, 3D animations of boom-buttons are supported:

bmb.setUse3DTransformAnimation(true);  // Whether use a 3D transform animation when booming or rebooming.

Or in .xml:

app:bmb_use3DTransformAnimation="true"

3D Animation Demo shows the difference of 3D and 2D animations.