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

Commit 2506055f authored by Bill Lin's avatar Bill Lin
Browse files

Refine MaterialButton style and Don't capitalize buttons

1.Don't capitalize buttons
2.Simplify the style structure
3.Override Widget.MaterialComponents.Button
4.Override Widget.MaterialComponents.Button.OutlinedButton

Note:
Refer https://material.io/design/components/buttons.html

Test: atest DocumentsUIGoogleTests
      manual check the visual of Button

Fix: 123734206
Fix: 129101032

Change-Id: I3e302a257eee0400b0e95b40fd3b2e114def1609
parent 0cac30ac
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@

    <com.google.android.material.button.MaterialButton
        android:id="@android:id/button2"
        style="@style/Widget.MaterialComponents.Button.OutlinedButton"
        style="?attr/materialButtonOutlinedStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
@@ -34,7 +34,7 @@

    <com.google.android.material.button.MaterialButton
        android:id="@android:id/button1"
        style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
        style="?attr/materialButtonStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
+1 −1
Original line number Diff line number Diff line
@@ -45,5 +45,5 @@
        android:layout_alignEnd="@+id/message_textview"
        android:layout_below="@+id/message_textview"
        android:text="@android:string/ok"
        style="?attr/materialButton"/>
        style="?attr/materialButtonStyle"/>
</RelativeLayout>
+2 −0
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@
        <item name="actionModeStyle">@style/ActionModeStyle</item>
        <item name="actionOverflowMenuStyle">@style/OverflowMenuStyle</item>
        <item name="bottomSheetDialogTheme">@style/BottomSheetDialogStyle</item>
        <item name="materialButtonStyle">@style/MaterialButton</item>
        <item name="materialButtonOutlinedStyle">@style/MaterialOutlinedButton</item>
        <item name="materialCardViewStyle">@style/CardViewStyle</item>
        <item name="queryBackground">@color/menu_search_background</item>
        <item name="snackbarButtonStyle">@style/SnackbarButtonStyle</item>
+3 −2
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@
        <attr name="android:colorAccent" />
    </declare-styleable>

    <declare-styleable name="HeaderMaterialButton">
        <attr name="materialButton" format="reference" />
    <declare-styleable name="MaterialButtons">
        <attr name="materialButtonStyle" format="reference" />
        <attr name="materialButtonOutlinedStyle" format="reference"/>
    </declare-styleable>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -66,6 +66,9 @@
    <!-- Indicates if internal storage is shown as default or not. -->
    <bool name="config_default_show_device_root">false</bool>

    <!-- Whether to show capitalize string on Button -->
    <bool name="config_button_all_caps">true</bool>

    <!-- This option allows us to hide the Files app icon from launcher on Android Go device.
    Android Go device will have Files Go app for file management. -->
    <bool name="is_launcher_enabled">true</bool>
Loading