我已经创建了一个简单的用户名/密码对话框,我想在其中应用一个主题(它基本上定义了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>调试工作正常。然而,WYSIWYG会更有价值。
发布于 2012-08-30 13:01:11
您应该在图形布局中选择另一个主题(例如:默认主题)。我认为您的自定义主题不支持某些属性。
https://stackoverflow.com/questions/10301171
复制相似问题