use of com.saulmm.material.utils.TransitionAdapter in project Android-Material-Examples by saulmm.
the class TransitionSecondActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_transition_second);
rowContainer = (LinearLayout) findViewById(R.id.row_container2);
Slide slideExitTransition = new Slide(Gravity.BOTTOM);
slideExitTransition.excludeTarget(android.R.id.navigationBarBackground, true);
slideExitTransition.excludeTarget(android.R.id.statusBarBackground, true);
getWindow().getEnterTransition().addListener(new TransitionAdapter() {
@Override
public void onTransitionEnd(Transition transition) {
super.onTransitionEnd(transition);
getWindow().getEnterTransition().removeListener(this);
for (int i = 0; i < rowContainer.getChildCount(); i++) {
View rowView = rowContainer.getChildAt(i);
rowView.animate().setStartDelay(i * SCALE_DELAY).scaleX(1).scaleY(1);
}
}
});
}
Aggregations