Tôi đã tạo hộp thoại tên người dùng/mật khẩu đơn giản mà tôi muốn áp dụng chủ đề (về cơ bản xác định windowBackground
) và cũng muốn xem trước trong Eclipse
.Xem trước chủ đề không thành công trong Eclipse
tôi thấy rằng chủ đề của tôi được hiển thị cùng chủ đề khác trong Theme combo box, nhưng chọn nó tạo ra các lỗi sau:
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)
Theme định nghĩa:
<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>
Debugging hoạt động tốt. Tuy nhiên WYSIWYG sẽ được nhiều hơn đáng kể.
bản sao có thể có của http://stackoverflow.com/questions/5050443/android-development-missing-theme-error-in-eclipse-ide-for-layout-xml-files – vrs