I want to create an animation transition in Android from one action to another. But during the animation, there is a short dimming on a black background, and then the animation of the next action that I want to display is displayed.
I want the first action to be inactive, so the second action will animate and overlap the first action. How can I achieve this behavior?
Here are my two current xml animation files that do not do what I want to achieve:
hold.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<translate
android:duration="2000"
android:zAdjustment="bottom" />
</set>
enter.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<translate
android:duration="2000"
android:fromXDelta="90%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
android:zAdjustment="top" />
</set>
My java code:
starter.overridePendingTransition(R.anim.enter,
R.anim.hold);
Thanks in advance Pat
source
share