Change the project theme in Android Studio?

前端 未结 3 1470
眼角桃花
眼角桃花 2021-02-02 07:08

I created some project using the light theme and now I want to change it to dark and I can\'t figure out how to do that. BTW, I\'m not asking on how to do it in code, just how t

3条回答
  •  时光取名叫无心
    2021-02-02 07:28

    Note : This answer is now out-of-date. This changes the theme in "preview" only as @imjohnking and @john-ktejik pointed out. As @Shahzeb mentioned, theme can modified in res>values>styles

    Android Studio 0.8.2 provides a slightly easier way to change the theme. In the preview window, you can select the theme of "Holo.Light.DarkActionBar" by clicking on the theme combo box just above the phone.enter image description here

    Or do a ctrl + click on the @style/AppTheme in the Android manifest file. It will open styles.xml file where you can change the parent attribute of the style tag.

    • Theme.Holo for a "dark" theme.
    • Theme.Holo.Light for a "light" theme.

    When using the Support Library, you must instead use the Theme.AppCompat themes:

    • Theme.AppCompat for the "dark" theme.
    • Theme.AppCompat.Light for the "light" theme.
    • Theme.AppCompat.Light.DarkActionBar for the light theme with a dark action bar.

    Source http://forums.udacity.com/questions/100200635/choosing-theme-in-android-studio-08x

提交回复
热议问题