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

Commit b175c283 authored by Arc Wang's avatar Arc Wang
Browse files

Tweak SettingsSpinner UI

1. Arrow icon size from 24 to 18
2. Round corner radius from 20 to 28
3. Height from 32 to 36
4. Set accentColor background to default view.
5. Set translucent accentColor background to default dropdown view.
6. Set dropdown view vertical offset to measured height.

Bug: 181833196
Test: manual visual
Change-Id: Ia538fd1831602ff38ba873c7f0a34d1ad5e90e18
parent bff3cb28
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@
  -->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:viewportWidth="18"
        android:viewportHeight="18"
        android:width="24dp"
        android:height="24dp">
    <path
        android:pathData="M7 10l5 5 5 -5z"
        android:fillColor="?android:attr/textColorPrimary"/>
        android:fillColor="@android:color/black"/>
</vector>
+8 −8
Original line number Diff line number Diff line
@@ -24,21 +24,21 @@
        android:bottom="8dp">
        <shape>
            <corners
                android:radius="20dp"/>
                android:radius="28dp"/>
            <solid
                android:color="?android:attr/colorPrimary"/>
                android:color="?android:attr/colorAccent"/>
            <stroke
                android:color="#1f000000"
                android:color="?android:attr/colorPrimary"
                android:width="1dp"/>
            <size
                android:height="32dp"/>
                android:height="@dimen/spinner_height"/>
        </shape>
    </item>

    <item
        android:gravity="center|end"
        android:width="24dp"
        android:height="24dp"
        android:end="4dp"
        android:drawable="@drawable/arrow_drop_down_24dp"/>
        android:width="18dp"
        android:height="18dp"
        android:end="8dp"
        android:drawable="@drawable/arrow_drop_down"/>
</layer-list>
 No newline at end of file
+33 −0
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.
  -->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item>
        <shape>
            <solid
                android:color="?android:attr/colorAccent"/>
        </shape>
    </item>

    <item>
        <shape>
            <solid android:color="#BBFFFFFF"/>
        </shape>
    </item>

</layer-list>
+25 −0
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.
-->

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    style="@style/SettingsSpinnerTitleBar"
    android:gravity="center_vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/settings_spinner_dropdown_background"/>
+1 −3
Original line number Diff line number Diff line
@@ -19,7 +19,5 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    style="@style/SettingsSpinnerTitleBar"
    android:maxLines="1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"/>
    android:layout_height="wrap_content"/>
Loading