2011-02-10 53 views
11

如何在我们的styles.xml中提供粗体和正常样式? 我给的代码是:如何在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> 

但其示值误差在这里:<item name="android:textstyle">

回答

22

这是因为它是textStyle,不textstyle。这些属性区分大小写。在互联网

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

搜索或问其他问题,如果你没有找到它的任何地方 – Prasham 2011-02-10 07:17:53

相关问题