2011-02-10 26 views
11

Làm thế nào tôi có thể đưa ra các kiểu in đậm và bình thường bên trong styles.xml của chúng tôi? Mã mà ta đã cho là:Làm thế nào tôi có thể cho một phong cách đậm trong android?

<style name="textbold" parent="@android:style/TextAppearance"> 
    <item name="android:layout_width">wrap_content</item> 
    <item name="android:layout_height">wrap_content</item> 
    <item name="android:textstyle">bold</item> 
</style> 
<style name="textregular" parent="@android:style/TextAppearance"> 
    <item name="android:layout_width">wrap_content</item> 
    <item name="android:layout_height">wrap_content</item> 
    <item name="android:textstyle">normal</item> 
</style> 

Nhưng lỗi hiển thị của nó ở đây: <item name="android:textstyle">

Trả lời

22

Đó là bởi vì nó textStyle, không textstyle. Các thuộc tính phân biệt chữ hoa chữ thường.

<item name="android:textStyle">normal</item> 
+0

tìm kiếm trên internet hoặc hỏi câu hỏi khác nếu bạn không tìm thấy nó ở bất cứ đâu – Prasham

+0

nếu tôi đã '

.... 'làm cách nào để tạo" Yêu cầu "đậm – Prabs

Các vấn đề liên quan