-
Notifications
You must be signed in to change notification settings - Fork 451
TextView TextSize Animation
Weiping Huang edited this page Apr 5, 2017
·
2 revisions
WoWoTextViewTextSizeAnimation changes the text size of a TextView instance. Any sub-class extends TextView is able to perform this animation.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ViewAnimation viewAnimation = new ViewAnimation(findViewById(R.id.test));
viewAnimation.add(WoWoTextViewTextSizeAnimation.builder().page(0)
.fromSp(50).toSp(20).build());
viewAnimation.add(WoWoTextViewTextSizeAnimation.builder().page(1)
.fromSp(20).toSp(60).build());
viewAnimation.add(WoWoTextViewTextSizeAnimation.builder().page(2)
.fromSp(60).toSp(5).build());
viewAnimation.add(WoWoTextViewTextSizeAnimation.builder().page(3).start(0).end(0.5)
.fromSp(5).toSp(50).build());
viewAnimation.add(WoWoTextViewTextSizeAnimation.builder().page(3).start(0.5).end(1)
.fromSp(50).toSp(30).build());
wowo.addAnimation(viewAnimation);
wowo.setEase(ease);
wowo.setUseSameEaseBack(useSameEaseTypeBack);
wowo.ready();
What if I wanna change the text size of a custom view that's not extends from TextView? Check Custom Animation for an answer.
WoWoTextViewTextSizeAnimation extends PageAnimation. Check more implementation details in its superclass.
Basic Animations
- Position Animation
- Position 3D Animation
- Translation Animation
- Translation 3D Animation
- Scale Animation
- Alpha Animation
- Rotation Animation
- Elevation Animation
TextView Animations
Color Animations
- Background Color Animation
- Shape Color Animation
- State-List Color Animation
- Layer-List Color Animation
Interface Expansibility