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
  • Ease Animations for Buttons

Ease Animations for Buttons · Changes

Page history
Updated Ease Animations for Buttons (markdown) authored Dec 11, 2016 by Weiping Huang's avatar Weiping Huang
Show whitespace changes
Inline Side-by-side
Ease-Animations-for-Buttons.md
View page @ b7e22088
Use different and cute ease-animations for buttons. Use different and cute ease-animations for buttons.
<img src="https://github.com/Nightonke/BoomMenu/blob/master/Pictures/ease-example.gif">
###Ease Animation
Ease animation, in other words, time interpolator, defines the rate of change of an animation. This allows animations
to have non-linear motion, such as acceleration and deceleration. Check [cubic-bezier](http://cubic-bezier.com/) to have some funs about ease animations.
In BMB, for each boom-button, there are 6 kinds of animation when booming or re-booming:
1. Move animation when booming.
Used by:
```
bmb.setShowMoveEaseEnum(EaseEnum.EaseOutBack);
```
Or in .xml:
```
app:bmb_showMoveEaseEnum="outBack"
```
The default value is `EaseEnum.EaseOutBack`
2. Rotate animation when booming.
Used by:
```
bmb.setShowRotateEaseEnum(EaseEnum.EaseOutBack);
```
Or in .xml:
```
app:bmb_showRotateEaseEnum="outBack"
```
The default value is `EaseEnum.EaseOutBack`
3. Scale animation when booming.
```
bmb.setShowScaleEaseEnum(EaseEnum.EaseOutBack);
```
Or in .xml:
```
app:bmb_showScaleEaseEnum="outBack"
```
The default value is `EaseEnum.EaseOutBack`
4. Move animation when re-booming.
Used by:
```
bmb.setHideMoveEaseEnum(EaseEnum.EaseInBack);
```
Or in .xml:
```
app:bmb_hideMoveEaseEnum="inBack"
```
The default value is `EaseEnum.EaseInBack`
5. Rotate animation when re-booming.
Used by:
```
bmb.setHideRotateEaseEnum(EaseEnum.EaseInBack);
```
Or in .xml:
```
app:bmb_hideRotateEaseEnum="inBack"
```
The default value is `EaseEnum.EaseInBack`
6. Scale animation when re-booming.
```
bmb.setHideScaleEaseEnum(EaseEnum.EaseInBack);
```
Or in .xml:
```
app:bmb_hideScaleEaseEnum="inBack"
```
The default value is `EaseEnum.EaseInBack`
###Ease Enum
There are 31 kinds of ease animations. Check the [EaseEnum](https://github.com/Nightonke/BoomMenu/blob/master/boommenu/src/main/java/com/nightonke/boommenu/Animation/EaseEnum.java) file to try all the enums or in .xml:
```
<enum name="inSine" value="0"/>
<enum name="outSine" value="1"/>
<enum name="inOutSine" value="2"/>
<enum name="inQuad" value="3"/>
<enum name="outQuad" value="4"/>
<enum name="inOutQuad" value="5"/>
<enum name="inCubic" value="6"/>
<enum name="outCubic" value="7"/>
<enum name="inOutCubic" value="8"/>
<enum name="inQuart" value="9"/>
<enum name="outQuart" value="10"/>
<enum name="inOutQuart" value="11"/>
<enum name="inQuint" value="12"/>
<enum name="outQuint" value="13"/>
<enum name="inOutQuint" value="14"/>
<enum name="inExpo" value="15"/>
<enum name="outExpo" value="16"/>
<enum name="inOutExpo" value="17"/>
<enum name="inCirc" value="18"/>
<enum name="outCirc" value="19"/>
<enum name="inOutCirc" value="20"/>
<enum name="inBack" value="21"/>
<enum name="outBack" value="22"/>
<enum name="inOutBack" value="23"/>
<enum name="inElastic" value="24"/>
<enum name="outElastic" value="25"/>
<enum name="inOutElastic" value="26"/>
<enum name="inBounce" value="27"/>
<enum name="outBounce" value="28"/>
<enum name="inOutBounce" value="29"/>
<enum name="linear" value="30"/>
```
<img src="https://github.com/Nightonke/WoWoViewPager/blob/master/Pictures/ease.png">
\ No newline at end of file
Clone repository

#####Documentation 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. Other Animations Attributes for Buttons
  11. Click Event and Listener
  12. Control BMB
  13. Use BMB in Action Bar
  14. Use BMB in List
  15. Use BMB in Fragment
  16. Attributes for BMB or Pieces on BMB
  17. Cache Optimization & Boom Area
  18. Structure for BMB