【发布时间】:2012-04-24 15:32:56
【问题描述】:
我创建了一个简单的用户名/密码对话框,我想在其中应用一个主题(它基本上定义了windowBackground),并且还想在Eclipse 中预览。
我看到我的主题在主题组合框中与其他主题一起显示,但选择它会产生以下错误:
Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
Failed to find style 'textViewStyle' in current theme
android.content.res.Resources$NotFoundException
Couldn't find theme resource attr/textAppearanceLarge for the current theme
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- TextView (Change to android.widget.TextView, Fix Build Path, Edit XML)
主题定义:
<style name="my_theme">
<item name="android:windowBackground">@drawable/form_header</item>
<!-- <item name="android:padding">0dp</item>-->
<item name="android:windowNoTitle">true</item>
</style>
调试工作正常。不过所见即所得会更显眼。
【问题讨论】:
标签: android android-theme