On Android 5.0 Lollipop,
I have two activities A and B. Activity B has a slie enter transition from bottom with a Overlay ActionBar, but when B shows, the ActionBar also slide from bottom to top.
How can i prevent the actionbar from slide transition. does system actionbar has an id that i can add to the exclude target ?
thanks!
If you are using the AppCompat v7 library, it is easy:
Unfortunately, the action bar container view ID is not part of the public API, so if you are not using the AppCompat v7 library (i.e. you are using the official framework libraries) you will need to work around this by using the following code to retrieve the ID instead:
Note that this code will break if the action bar container's ID name changes in a future version of Android. I doubt it will ever change though...
See this post for some other related information.
My solution is to extend the style with this args:
This here is my
res/transition/slide.xml
:This here is my
res/transition/enter.xml
:You can play around with that transitions as you like, important is just those excluded targets.