Skip to content

Elevation Animation

Weiping Huang edited this page Apr 5, 2017 · 4 revisions

WoWoElevationAnimation changes the elevation value of a view by method setElevation. Notice this method is only available from Lollipop.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    TextView text = (TextView) findViewById(R.id.test);
    wowo.addAnimation(text)
            .add(WoWoElevationAnimation.builder().page(0).from(0).to(30).build())
            .add(WoWoElevationAnimation.builder().page(1).from(30).to(60).build())
            .add(WoWoElevationAnimation.builder().page(2).from(60).to(0).build())
            .add(WoWoElevationAnimation.builder().page(3).from(0).to(60).build());
    wowo.setEase(ease);
    wowo.setUseSameEaseBack(useSameEaseTypeBack);
    wowo.ready();
}

WoWoElevationAnimation extends PageAnimation. Check more implementation details in its superclass.

Methods List of WoWoElevationAnimation.builder()