I am using the Action Bar in my Android application, and i am using sliding animation during activity transition, by calling:
startActivityForResult(i, ALL_OK);
overridePendingTransition(R.anim.slide_in, R.anim.slide_out);
where in my xml files i have the following code:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="400"/>
</set>
and
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="400"/>
</set>
The animation is executed successfully, but the slide also include the Action Bar.
Is there a way that the Action Bar will stay stable during the activity transition ?
Is there a way that the Action Bar will stay stable during the activity transition ?
No, sorry. If you are switching between activities, the entire UI changes, action bar and all.
If your desired UI behavior is essential, rewrite your app to have one activity and multiple fragments, and use animations for transitioning between the fragments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With