如何在android中提供大胆的风格?

Anj*_*nju 13 android android-styles

如何在styles.xml中提供粗体和普通样式?我给出的代码是:

<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>
Run Code Online (Sandbox Code Playgroud)

但它在这里显示错误: <item name="android:textstyle">

Ebo*_*ike 24

那是因为它textStyle不是textstyle.属性区分大小写.

    <item name="android:textStyle">normal</item>
Run Code Online (Sandbox Code Playgroud)