Skip to content

Commit

Permalink
bugfix: the span in Button make no sense when textAllCaps is sett to …
Browse files Browse the repository at this point in the history
…true
  • Loading branch information
cgspine committed Sep 8, 2017
1 parent e801610 commit 6e21eb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 0 additions & 3 deletions qmui/src/main/res/values-v21/qmui_themes_compat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@
<style name="Button.Compat" parent="ButtonBase.Compat">
<!-- 去掉5.0下Button点击的阴影动画效果 -->
<item name="android:stateListAnimator">@null</item>
<!-- 取消5.0下Button字符默认大写的功能(会导致 Spannable 失效) -->
<!-- http://stackoverflow.com/questions/29007746/button-settext-with-spannable-dosent-work-for-android-5-0-lollipop -->
<item name="android:textAllCaps">false</item>
</style>
</resources>
6 changes: 5 additions & 1 deletion qmui/src/main/res/values/qmui_themes_compat.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@
<style name="ListViewBase.Compat" parent="@style/Widget.AppCompat.ListView" />
<style name="GridViewBase.Compat" parent="android:Widget.GridView" />
<style name="ImageButtonBase.Compat" parent="@style/Widget.AppCompat.ImageButton" />
<style name="ButtonBase.Compat" parent="@style/Widget.AppCompat.Button" />
<style name="ButtonBase.Compat" parent="@style/Widget.AppCompat.Button" >
<!-- 取消 Button 字符默认大写的功能(会导致 Spannable 失效),默认值只影响 5.0 以上版本,但使用Compat包后,4.x 版本也会受到影响 -->
<!-- http://stackoverflow.com/questions/29007746/button-settext-with-spannable-dosent-work-for-android-5-0-lollipop -->
<item name="android:textAllCaps">false</item>
</style>
<style name="EditTextBase.Compat" parent="@style/Widget.AppCompat.EditText" />
<style name="AutoCompleteTextViewBase.Compat" parent="@style/Widget.AppCompat.AutoCompleteTextView" />
<style name="DropDownListViewBase.Compat" parent="@style/Widget.AppCompat.ListView.DropDown" />
Expand Down

0 comments on commit 6e21eb0

Please sign in to comment.