how to remove Black background between start new activity during slide_left animation?
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>
set the theme of that activity as transluscent in manifest file
android:theme="@android:style/Theme.Translucent"
so your code will be something like this
<activity android:name=".AdActivity"
android:theme="@android:style/Theme.Translucent" />
If you are using the AppCompat ActionBarActivity you will need to use a theme that extends Theme.AppCompat
To give me the option to add background transparency to just the activities that needed it (ones launched using the intent flag_activity_new_task) but keep the background for the rest of the app.. I extended my main theme and set the transparent background options in that style.
<!-- The main theme applied to the application or activity -->
<style name="Theme.app" parent="Theme.AppCompat.NoActionBar">
<!-- Your main app theme items go here-->
<item name="android:windowBackground">@drawable/some_drawable</item>
</style>
<!-- Transparent background for app / activity -->
<style name="Theme.app.Translucent" parent="Theme.app">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
</style>