Detect Android activity in a dialog with a light theme

In my application, I define one action for Android as a dialog.It looks right. Only problem with this - my dialogue appears in a dark topic. I want to show it in an easy topic. I defined the dialogue of my activities as follows:

<activity android:theme="@android:style/Theme.DeviceDefault.Dialog.MinWidth" android:name="com.example.dialog" android:label="@string/title_activity_list" > </activity> 

How to do it. Any solution. Need help. Thanks.

+4
source share
4 answers

You need to use the voice highlight dialog theme:

 <activity android:theme="@android:style/Theme.Holo.Light.Dialog" android:name="com.example.dialog" android:label="@string/title_activity_list" /> 
+8
source

Rotation is the definition of a custom theme in xml style, check the code below: -

Style:

 <style name="Theme.D1NoTitleDim" parent="android:style/Theme.Translucent"> <item name="android:windowNoTitle">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:backgroundDimEnabled">true</item> <item name="android:background">#22000000</item> </style> 

manifest:

 <activity android:theme="@style/Theme.D1NoTitleDim" android:name="com.example.dialog" android:label="@string/title_activity_list" > </activity> 
+3
source

That worked for me too. I applied the application theme to dialogue activity.

 <style name="Theme.UserDialog" parent="@style/MyAppTheme"> <item name="android:windowFrame">@null</item> <item name="android:windowIsFloating">true</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowNoTitle">true</item> </style> 
+1
source

try it can help you

 <activity android:theme="@android:style/Theme_Wallpaper" android:name="com.example.dialog" android:label="@string/title_activity_list" > </activity> 
0
source

Source: https://habr.com/ru/post/1499735/


All Articles