【问题标题】:textAllCaps not working below api 14 in AppcompatButtontextAllCaps 在 AppcompatButton 中的 api 14 以下不起作用
【发布时间】:2016-01-24 15:47:04
【问题描述】:

我正在使用 android.support.v7.widget.AppCompatButton 状态
Supports textAllCaps style attribute which works back to Eclair MR1
但我在模拟器中使用 api 10 和android:textAllCaps = "false" 进行了测试,它不起作用。 任何 cmets 或文档为什么说错或我做错了什么?

它也不适用于应用前缀。

【问题讨论】:

    标签: android android-support-library


    【解决方案1】:

    http://developer.android.com/reference/android/support/v7/widget/AppCompatButton.html

    支持textAllCaps 样式属性,该属性可回溯到Eclair MR1Android 2.1-在 API 级别 7 中添加)。

    检查这个答案:

    https://stackoverflow.com/a/22470083/4409113

    <android.support.v7.internal.widget.CompatTextView
            style="@style/MyTextViewStyle"
            android:id="@+id/text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:textAllCaps="true"/>
    

    app 前缀一起使用。

    【讨论】:

    • 。为什么我必须为此制作样式?
    • 如果我们不使用样式属性,它不适用于应用前缀,为什么?
    猜你喜欢
    • 2021-10-17
    • 2015-12-21
    • 1970-01-01
    • 1970-01-01
    • 2017-07-12
    • 1970-01-01
    • 2015-07-05
    • 2018-10-18
    • 2015-12-17
    相关资源
    最近更新 更多