0

我知道如何在 Android 中为应用程序和/或活动设置主题,但我想知道是否可以使用 Eclipse 4.2、ADT 20.0.1 中的图形布局编辑器为活动更改主题。无论我将下拉菜单更改为什么,在我运行应用程序时始终使用来自 styles.xml 的 AppTheme 样式,尽管显示预览会根据我选择的内容发生变化。由于主题是在 AndroidManifest 中设置的,因此目前不可能吗?

Eclipse 图形布局编辑器中的 Android 主题选择

样式.xml:

<resources>
    <style name="AppTheme" parent="android:Theme.Light" />
</resources>
4

2 回答 2

4

The drop down box in the GUI is used to see what it looks like, if you want the theme changed then you have to edit the Android Manifest yourself

If you want to edit the theme using a drop down, in one of the tabs in the Android Manifest, I think its "Application" there is an option to change the theme and it has a list of themes.

于 2012-07-23T22:13:50.953 回答
0

Yep, the theme must be set in the Manifest or in Java.

The drop-down on the layout editor is only there to help debug and test theme issues and whatnot, it doesn't have any effect on your actual app.

于 2012-07-23T22:13:20.903 回答