Sound panel doesn't match material next design for Android S

-title layout/margin/font size adjustment
-remove panel gap on left and right sides
-apply round corner 28dp only on top two corners

Bug: 191317779
Test: make -j50 RunSettingsRoboTests
Change-Id: I8ebd9238a7e746a48ae6baa4361600b5a21446c1
This commit is contained in:
Tim Peng
2021-06-23 16:01:14 +08:00
parent cd6c64a5c7
commit c3c6d6d876
3 changed files with 41 additions and 7 deletions

View File

@@ -0,0 +1,26 @@
<?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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android">
<shape android:shape="rectangle">
<corners
android:topLeftRadius="@dimen/settings_panel_corner_radius"
android:topRightRadius="@dimen/settings_panel_corner_radius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"/>
<solid android:color="?android:attr/colorBackground" />
</shape>
</inset>

View File

@@ -20,7 +20,7 @@
android:id="@+id/panel_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/settings_panel_background" >
android:background="@drawable/settings_panel_rounded_top_corner_background" >
<LinearLayout
android:layout_width="match_parent"
@@ -30,7 +30,11 @@
<LinearLayout
android:id="@+id/panel_header"
android:layout_width="match_parent"
android:layout_height="94dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/settings_panel_title_margin"
android:layout_marginEnd="@dimen/settings_panel_title_margin"
android:layout_marginTop="@dimen/settings_panel_title_margin"
android:layout_marginBottom="@dimen/settings_panel_title_margin"
android:gravity="start|center_vertical"
android:orientation="horizontal"
android:visibility="gone">
@@ -51,14 +55,13 @@
android:id="@+id/header_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:orientation="vertical">
<TextView
android:id="@+id/header_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?android:attr/textColorPrimary"
@@ -81,11 +84,12 @@
android:id="@+id/panel_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settings_panel_title_margin"
android:layout_marginBottom="@dimen/settings_panel_title_margin"
android:gravity="center"
android:paddingBottom="24dp"
android:paddingTop="18dp"
android:textColor="?android:attr/textColorPrimary"
android:textSize="20sp"/>
android:textSize="24sp"
android:fontFamily="sans-serif-reqular"/>
<ProgressBar
android:id="@+id/progress_bar"

View File

@@ -427,6 +427,10 @@
<dimen name="output_switcher_panel_icon_size">52dp</dimen>
<dimen name="output_switcher_panel_icon_corner_radius">16dp</dimen>
<!-- Settings panel related dimensions -->
<dimen name="settings_panel_corner_radius">28dp</dimen>
<dimen name="settings_panel_title_margin">24dp</dimen>
<!-- Text padding for EmptyTextSettings -->
<dimen name="empty_text_padding">24dp</dimen>