Merge "Sound panel doesn't match material next design for Android S" into sc-dev
diff --git a/res/drawable/settings_panel_rounded_top_corner_background.xml b/res/drawable/settings_panel_rounded_top_corner_background.xml
new file mode 100644
index 0000000..1c234cc
--- /dev/null
+++ b/res/drawable/settings_panel_rounded_top_corner_background.xml
@@ -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>
\ No newline at end of file
diff --git a/res/layout/panel_layout.xml b/res/layout/panel_layout.xml
index 674e20e..9e15f15 100644
--- a/res/layout/panel_layout.xml
+++ b/res/layout/panel_layout.xml
@@ -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"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f3b8a91..33fe1f5 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -425,6 +425,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>