When I call new activity by animation the background gets black.
How can I remove remove the black background?
For the animation I'm using:
getWindow().setBackgroundDrawableResource(R.drawable.mainbg_); overridePendingTransition (R.anim.push_up_in,0);
Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.
Setting the Theme didn't work for me, but adding an exit animation did.
overridePendingTransition (R.anim.push_up_in,R.anim.hold);
For the exit animation, I just used an animation that does nothing.
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromYDelta="0%p" android:toYDelta="0%p" android:duration="2000"/> </set>
All you really need, especially if you already got a theme set to the activity and don't want to use the Theme.Translucent suggested is add the following to your activity/app's theme:
<item name="android:windowIsTranslucent">true</item>
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