Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da26a9fa authored by Jason Chang's avatar Jason Chang
Browse files

Fix button should not be all caps

The button style comes from <style name="TextAppearance.Material.Button"> and textAllCaps be set "true". That causes the text in ALL CAPS problem.
To provide message button in normal cap styles for current theme to fix this issue.

Change-Id: I838c8c1620d630f7edb332061cbe77b508118984
Fix: 123734206
Test: Manually test
parent b726203f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
            android:layout_gravity="end"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="@string/button_dismiss"
            style="?android:attr/buttonBarPositiveButtonStyle"/>
            android:text="@android:string/ok"
            style="?attr/materialButton"/>

</LinearLayout>
+3 −0
Original line number Diff line number Diff line
@@ -68,4 +68,7 @@
        <attr name="android:colorAccent" />
    </declare-styleable>

    <declare-styleable name="HeaderMaterialButton">
        <attr name="materialButton" format="reference" />
    </declare-styleable>
</resources>
+9 −0
Original line number Diff line number Diff line
@@ -63,4 +63,13 @@
    <style name="SubMenuStyle">
        <item name="android:textColorSecondary">?android:attr/textColorPrimary</item>
    </style>

    <style name="MaterialButton" parent="android:style/Widget.Material.Button">
        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
        <item name="android:textAppearance">@style/MaterialButtonTextAppearance</item>
    </style>

    <style name="MaterialButtonTextAppearance" parent="android:style/TextAppearance.Material.Button">
        <item name="android:textAllCaps">false</item>
    </style>
</resources>
+2 −1
Original line number Diff line number Diff line
@@ -65,7 +65,8 @@

        <item name="actionModeStyle">@style/ActionModeStyle</item>
        <item name="actionOverflowMenuStyle">@style/OverflowMenuStyle</item>
        <item name="bottomSheetDialogTheme">@style/BottomSheetDialogStyle</item>
        <item name="bottomSheetDialogTheme">@style/BottomSheetDialogStyle</item>tem>
        <item name="materialButton">@style/MaterialButton</item>
        <item name="materialCardViewStyle">@style/CardViewStyle</item>
        <item name="queryBackground">@color/menu_search_background</item>
        <item name="snackbarButtonStyle">@style/SnackbarButtonStyle</item>