use of android.transition.Explode in project KL2 by jweihao.
the class TransitionsToActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
int flag = getIntent().getExtras().getInt("flag");
// 根据flag的值来设置不同的动画效果
switch(flag) {
case 0:
getWindow().setEnterTransition(new Explode());
break;
case 1:
getWindow().setEnterTransition(new Slide());
break;
case 2:
getWindow().setEnterTransition(new Fade());
getWindow().setExitTransition(new Fade());
case 3:
break;
default:
break;
}
setContentView(R.layout.activity_transitions_to);
}
use of android.transition.Explode in project TicktockMusic by Lauzy.
the class FragmentAnimUtil method setEnterExitAnim.
public static void setEnterExitAnim(Fragment fragment) {
Explode explode = new Explode();
explode.setDuration(350);
explode.setInterpolator(new DecelerateInterpolator());
explode.setMode(Visibility.MODE_IN);
Slide slide = new Slide();
slide.setSlideEdge(Gravity.LEFT);
slide.setDuration(200);
Fade fade = new Fade();
fade.setDuration(200);
fragment.setReturnTransition(fade);
fragment.setEnterTransition(explode);
fragment.setSharedElementEnterTransition(new FragmentTransition());
fragment.setSharedElementReturnTransition(new FragmentTransition());
}
use of android.transition.Explode in project ExpandingPager by qs-lll.
the class MainActivity method setupWindowAnimations.
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void setupWindowAnimations() {
Explode slideTransition = new Explode();
getWindow().setReenterTransition(slideTransition);
getWindow().setExitTransition(slideTransition);
}
use of android.transition.Explode in project MaterialLogin by fanrunqi.
the class AActivityThree method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.a_activity_three);
Explode explode = new Explode();
explode.setDuration(500);
getWindow().setExitTransition(explode);
getWindow().setEnterTransition(explode);
}
Aggregations