Reputation: 9479
How can I give bold and normal styles inside our styles.xml? The code which I have given is:
<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>
But its showing error over here: <item name="android:textstyle">
Upvotes: 15
Views: 14260
Reputation: 77752
That's because it's textStyle
, not textstyle
. The attributes are case-sensitive.
<item name="android:textStyle">normal</item>
Upvotes: 27