android Button、TabLayout英文自动改小写为大写的问题


  如果是Button自动大写问题,直接设置Button的 textAllCaps="false" 即可;

  如果是TabLayout出现全大写问题,先在style.xml加入属性:

<style name="TabLayoutTextStyle" parent="TextAppearance.Design.Tab">
        <item name="android:textSize">12sp</item>
        <item name="textAllCaps">false</item>
</style>

布局中引入该样式即可

<!-- 注:无效方式 style="@style/TabLayoutTextStyle" -->
<android.support.design.widget.TabLayout
    android:id="@+id/pcTabLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" app:tabTextAppearance="@style/TabLayoutTextStyle" />

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM