【问题标题】:Application theme dose't change using Theme in Editor in Android Studio在 Android Studio 的编辑器中使用主题不会更改应用程序主题
【发布时间】:2018-10-06 23:40:49
【问题描述】:

您好,我是 Android 新手,我只想使用 Android Studio 中的“编辑器中的主题”更改我的应用程序主题,主题是更改预览,但是当我运行应用程序时,我看不到任何转换,当我想要时编辑它无法识别的样式的 Apptheme 属性,例如 Holo 主题。

【问题讨论】:

  • “编辑器中的主题”正如它所说的,一种更改布局编辑器中显示的主题的方法。要更改应用主题,请阅读Customize the default theme

标签: android android-studio styles themes app-themes


【解决方案1】:

转到AndroidManifest.xml。在应用程序标签中按CTR+点击 android:theme="@style/AppTheme" 它打开style.xml 然后在 style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

中根据需要更改主题

【讨论】:

    【解决方案2】:

    在清单文件中将 android:theme="@style/AppTheme" 更改为 android:theme="@android:style/Theme.Holo"。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-14
      • 2016-06-08
      • 2015-05-18
      相关资源
      最近更新 更多