android - Activity enter and exit Animation or Transition? -
the title might appeal general question issue more specific.
as luck have it, working on project supports lollipop , next. there bunch of api related material design never used before , today facing 1 of them: the new transition system shared elements.
but problem way simpler. need start activity must appear bottom, not (50%p) fading animation along
.
coming pre-lollipop experience, intended use overridependingtransition
method following xml in res/anim
:
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillafter="true"> <alpha android:fromalpha="0" android:toalpha="1" android:interpolator="@android:anim/accelerate_interpolator" android:duration="1500"/> <translate android:duration="1500" android:fromydelta="50%p" android:toydelta="0%p" android:interpolator="@android:anim/accelerate_interpolator"/> </set>
but problem whole screen animating, means status bar , navigation bar animated , i don't want @ all.
so started looking solutions.
way before kitkat came out first scene
, transition
apis faced similar problem , think found solution @ time, life of me can't today: most findings pointed me new transition system.
so have following xml in res/transition
:
<?xml version="1.0" encoding="utf-8"?> <transitionset xmlns:android="http://schemas.android.com/apk/res/android" android:transitionordering="together" android:interpolator="@android:interpolator/accelerate_quad"> <slide android:slideedge="bottom" android:duration="1000"/> <fade android:fadingmode="fade_in" android:duration="1000"/> </transitionset>
following solution managed prevent status , navigation bar animate. however, can't seem find way tweak slide transition animations
.
so question (finally) : there way exclude status , navigation bar using overridependingtransition
? if yes, how ?? if no ... how can tweak slide animation ?
thanks !
Comments
Post a Comment