android - How can I add an animation to the activity finish() -
i'm using overridependingtransition when activity created , works fine can see fade in works great, when try , animate finish on activity still doing default right left slide.
i first tried defining out animation when start activity follows:
intent myintent = new intent(a, skdyalert.class); myintent.addflags(intent.flag_activity_single_top); a.startactivity(myintent); if (android.os.build.version.sdk_int > android.os.build.version_codes.donut) { animationhelper.overridependingtransition(a, r.anim.fadein, r.anim.fadeout); }
then tried doing when finish activity well
okbtn.setonclicklistener(new onclicklistener() { public void onclick(view v) { finish(); if (android.os.build.version.sdk_int > android.os.build.version_codes.donut) { animationhelper.overridependingtransition(activity, 0, r.anim.fadeout); } } });
but neither of these approaches prevent "right left" slide exit animation. ideas on i'm doing wrong?
i override pending transition after calling finish();
in case, have done avoid transitions.
finish(); details.this.overridependingtransition(r.anim.nothing,r.anim.nothing);
order important :)
Comments
Post a Comment