Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to create a Dialog with a Light theme?
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/3507016/light-theme-for-alertdialog">Light theme for AlertDialog?</a> </p> </blockquote> <p>I haven't been able to find a Light Theme provided by the sdk for dialogs. Setting a Dialog's style Theme.Light, makes it appear to be a full screen Activity -- and there doesn't appear to be any Theme.LightDialog available.</p> <p>It was recommended to me that I create my own LightDialog Theme. In order to do this I tried: 1. extending android's Theme.Light and adding the dialogy properties from Theme.Dialog </p> <pre><code>&lt;style name="Theme.LightDialog" parent="@android:style/Theme.Light"&gt; &lt;item name="android:windowFrame"&gt;@null&lt;/item&gt; &lt;item name="android:windowTitleStyle"&gt;@android:style/DialogWindowTitle&lt;/item&gt; &lt;item name="android:windowBackground"&gt;@android:drawable/panel_background&lt;/item&gt; &lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt; &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt; &lt;item name="android:windowAnimationStyle"&gt;@android:style/Animation.Dialog&lt;/item&gt; &lt;/style&gt; </code></pre> <p>... and 2. extending android's Theme.Dialog and adding the lighty properties from Theme.Light. </p> <pre><code> &lt;style name="Theme.LightDialog" parent="@android:style/Theme.Dialog"&gt; &lt;item name="android:windowBackground"&gt;@drawable/screen_background_light&lt;/item&gt; &lt;item name="android:colorBackground"&gt;@android:color/background_light&lt;/item&gt; &lt;item name="android:colorForeground"&gt;@androidcolor/bright_foreground_light&lt;/item&gt; &lt;item name="android:colorForegroundInverse"&gt;@android:color/bright_foreground_light_inverse&lt;/item&gt; &lt;item name="android:textColorPrimary"&gt;@android:color/primary_text_light&lt;/item&gt; &lt;item name="android:textColorSecondary"&gt;@android:color/secondary_text_light&lt;/item&gt; &lt;item name="android:textColorTertiary"&gt;@android:color/tertiary_text_light&lt;/item&gt; &lt;item name="android:textColorPrimaryInverse"&gt;@android:color/primary_text_dark&lt;/item&gt; &lt;item name="android:textColorSecondaryInverse"&gt;@android:color/secondary_text_dark&lt;/item&gt; &lt;item name="android:textColorTertiaryInverse"&gt;@android:color/tertiary_text_dark&lt;/item&gt; &lt;item name="android:textColorPrimaryDisableOnly"&gt;@android:color/primary_text_light_disable_only&lt;/item&gt; &lt;item name="android:textColorPrimaryInverseDisableOnly"&gt;@android:color/primary_text_dark_disable_only&lt;/item&gt; &lt;item name="android:textColorPrimaryNoDisable"&gt;@android:color/primary_text_light_nodisable&lt;/item&gt; &lt;item name="android:textColorSecondaryNoDisable"&gt;@android:color/secondary_text_light_nodisable&lt;/item&gt; &lt;item name="android:textColorPrimaryInverseNoDisable"&gt;@android:color/primary_text_dark_nodisable&lt;/item&gt; &lt;item name="android:textColorSecondaryInverseNoDisable"&gt;@android:color/secondary_text_dark_nodisable&lt;/item&gt; &lt;item name="android:textColorHint"&gt;@android:color/hint_foreground_light&lt;/item&gt; &lt;item name="android:textColorHintInverse"&gt;@android:color/hint_foreground_dark&lt;/item&gt; &lt;/style&gt; </code></pre> <p>Both of these attempts failed because they use non-public attributes. Any suggestions on how to create a LightDialog theme?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload