android - OverridePendingTransition with the current activity on top -
i want current scoreactivity.this
slide , gameactivity.class
remain in place in background.
it works great going gameactivity
scoreactivity
, on way shows gameactivity
without animation. (because slide_up happens behind i'm assuming)
anything helps, including pointing me duplicate post.
scoreactivity
restart.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent intent = new intent(scoreactivity.this, gameactivity.class); //intent.addflags(intent.flag_activity_brought_to_front); neither of these work //intent.addflags(intent.flag_activity_reorder_to_front); startactivity(intent); finish(); overridependingtransition(r.anim.no_change, r.anim.slide_up); } });
gameactivity (triggered when user gets "game over")
intent intent = new intent(gameactivity.this, scoreactivity.class); startactivity(intent); finish(); overridependingtransition(r.anim.slide_in_down, r.anim.no_change);
you should define zadjustment on both animations xml's.
on first - android:zadjustment="bottom"
on sec - android:zadjustment="top"
android animation android-intent
No comments:
Post a Comment