本文介紹了為每個(gè)對(duì)話框更改對(duì)話框主題的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
我正在使用 Theme.Holo.Light.DarkActionBar,但我不太喜歡 Light Dialogs/AlertDialogs.
Im using Theme.Holo.Light.DarkActionBar but I dont really like the Light Dialogs/AlertDialogs.
我想把每個(gè) Dialog 都改成暗的 Holo Dialog.
I want to change every Dialog to the dark Holo Dialog.
<style name="CustomDialogTheme" parent="@android:style/Theme.Holo.Dialog">
<item name="@android:background">#9933CC</item>
<item name="@android:textColor">#02FA07</item>
</style>
<style name="Holo.Light.DarkActionBar" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:dialogTheme">@style/CustomDialogTheme</item>
<item name="android:alertDialogStyle">@style/CustomDialogTheme</item>
</style>
這就是我嘗試過的,但它對(duì)任何對(duì)話框都沒有影響.
Thats what I tried but it has no effect on any Dialogs.
推薦答案
好的 nvm 我愚蠢的是它的 android:alertDialogTheme
而不是 android:alertDialogStyle
.但這會(huì)弄亂 Preference Dialogs,所以我只是繼續(xù)使用 Light Dialogs.
Ok nvm Im stupid its android:alertDialogTheme
instead of android:alertDialogStyle
. But this messes up the Preference Dialogs, so I just keep using the Light Dialogs.
這篇關(guān)于為每個(gè)對(duì)話框更改對(duì)話框主題的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!