Translucent Activity filling the entire screen
I've read the other solutions, but here is my solution:
style.xml
<resources>
<style name="mytransparent.windowNoTitle" parent="android:Theme.Holo.Light">
<item name="android:windowNoTitle">true</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>
<style name="mytransparent.windowTitle" parent="android:Theme.Holo.Light">
<item name="android:background">@android:color/transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
</style>
AndroidManifest.xml
<activity
android:name=".LoginActivity"
android:theme="@style/mytransparent.windowTitle"
android:configChanges="orientation"
android:label="@string/title_activity_login"
android:screenOrientation="portrait" ></activity>
Finally, this theme worked to get a result like image number 4:
<style name="Theme.CustomTranslucent" parent="android:style/Theme.Translucent">
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.5</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:background">@android:color/transparent</item>
</style>
In my activity 2 layout, I could eihter set android:background="@android:color/transparent"
or not set any value at all to make it work.
Thanks to MikeIsrael and Veer for their help.