How to implement the “parent-to-child” navigational transition as prescribed by Material Design

前端 未结 4 1485
北荒
北荒 2020-12-05 07:44

Google\'s Material Design guidelines prescribe the following transition for \"parent-to-child\" transitions when the parent consists of a list. (Material Design Guidelines)

4条回答
  •  执念已碎
    2020-12-05 08:31

    you can animation using below code

    Intent intent = new Intent(MainActivity.this, NFCTagInformationActivity.class);
    Bundle options = ActivityOptionsCompat.makeClipRevealAnimation(
                cvTagInfoSmall, 0, 0, cvTagInfoSmall.getWidth(), cvTagInfoSmall.getHeight()).toBundle();
    ActivityCompat.startActivity(this, intent, options);
    

    you can use makeScaleUpAnimation instead of makeClipRevealAnimation for different view transition animation.

提交回复
热议问题