Change Dialog Theme for every Dialog

后端 未结 2 1278
栀梦
栀梦 2021-01-11 19:14

Im using Theme.Holo.Light.DarkActionBar but I dont really like the Light Dialogs/AlertDialogs.

I want to change every Dialog to the dark Holo Dialog.



        
相关标签:
2条回答
  • 2021-01-11 19:43

    In AndroidManifest.xml under the application tag, add this line :

    android:theme="Holo.Light.DarkActionBar"
    

    The issue is that the styles you're changing android:background and android:textColor are not dialog attributes.

    You can see a full list here under Theme.Holo.Dialog on line 1617.

    The ones you have to change are probably android:windowBackground and textAppearance

    0 讨论(0)
  • 2021-01-11 19:44

    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.

    0 讨论(0)
提交回复
热议问题