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

Commit 24fbcea5 authored by Edgar Wang's avatar Edgar Wang
Browse files

Update Spinner and Progressbar style to adopt Material Next style.

- Remove SettingsSpinner and move style to SettingsTheme.
- Remove unnecessary resource in SettingsSpinner

Bug: 219610512
Test: manual

Change-Id: Ic0f9dc164901a88f4a14c3b2c08707310ae63ad2
parent 1f93f123
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2021 The Android Open Source Project
     Copyright (C) 2022 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -18,8 +18,7 @@
<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    style="@style/SettingsSpinnerTitleBar"
    style="@style/SettingsSpinnerDropdown"
    android:gravity="center_vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/settings_spinner_dropdown_background"/>
    android:layout_height="wrap_content"/>
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
    android:layout_marginStart="16dp"
    android:layout_marginEnd="16dp">

    <com.android.settingslib.widget.settingsspinner.SettingsSpinner
    <Spinner
        android:id="@+id/spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
+0 −19
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <color name="ripple_color">@*android:color/material_grey_900</color>
</resources>
+3 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
<!-- Copyright (C) 2022 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -15,5 +15,6 @@
-->

<resources>
    <color name="ripple_color">?android:attr/colorControlHighlight</color>
    <color name="settingslib_spinner_title_color">@android:color/system_neutral1_900</color>
    <color name="settingslib_spinner_dropdown_color">@android:color/system_neutral2_700</color>
</resources>
+42 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2022 The Android Open Source Project

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->

<resources>
    <style name="SettingsSpinnerTitleBar">
        <item name="android:textAppearance">?android:attr/textAppearanceButton</item>
        <item name="android:textColor">@color/settingslib_spinner_title_color</item>
        <item name="android:maxLines">1</item>
        <item name="android:ellipsize">marquee</item>
        <item name="android:minHeight">@dimen/spinner_height</item>
        <item name="android:paddingStart">16dp</item>
        <item name="android:paddingEnd">36dp</item>
        <item name="android:paddingTop">@dimen/spinner_padding_top_or_bottom</item>
        <item name="android:paddingBottom">@dimen/spinner_padding_top_or_bottom</item>
    </style>

    <style name="SettingsSpinnerDropdown">
        <item name="android:textAppearance">?android:attr/textAppearanceButton</item>
        <item name="android:textColor">@color/settingslib_spinner_dropdown_color</item>
        <item name="android:maxLines">1</item>
        <item name="android:ellipsize">marquee</item>
        <item name="android:minHeight">@dimen/spinner_height</item>
        <item name="android:paddingStart">16dp</item>
        <item name="android:paddingEnd">36dp</item>
        <item name="android:paddingTop">@dimen/spinner_padding_top_or_bottom</item>
        <item name="android:paddingBottom">@dimen/spinner_padding_top_or_bottom</item>
    </style>
</resources>
Loading