I need to show a user dialog in an android app. The standard design of AlertDialog not acceptable. Android docs say:
Tip. If you need a special dialog, you can instead display Activity as a dialog instead of using the Dialog APIs. Just create and set its Theme.Holo.Dialog theme in the manifest:
What is it. Now the activity is displayed in the dialog box instead of full-screen mode.
It sounds promising. I did it, but transparency doesn't work! The background is always gray:

Here is the description in the manifest:
<activity android:name=".MyDialogActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Holo.Dialog.NoActionBar" > </activity>
Here is the root of my activity:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:background="#00000000" android:layout_width="400dp" android:layout_height="wrap_content" > // Content ... // </RelativeLayout>
I also tried android:background="@null" - the effect was the same. If I use android:background="#ff0000" , then it will be red (as it should be). But how to make it transparent?
Update
I finished with
<style name="MyThemeDialogCustom" parent="android:Theme.Holo.Dialog.NoActionBar" > <item name="android:windowBackground">@color/transparent</item> <item name="android:colorBackgroundCacheHint">@null</item> </style>
source share