From 2bdd775bbfaf63172c2e8aed72a801f307b987a5 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Fri, 7 May 2021 13:22:48 -0400 Subject: [PATCH] Add rounded corners to customizer decoration Test: manual Fixes: 187436887 Change-Id: I2f8dabfb0fc778afc43b1af6901ee878544070ad --- .../SystemUI/res/drawable/qs_customize_tile_decoration.xml | 7 +++++-- packages/SystemUI/res/layout/qs_customize_divider.xml | 5 +++-- .../SystemUI/res/layout/qs_customize_panel_content.xml | 7 +++++-- packages/SystemUI/res/values/dimens.xml | 1 + .../src/com/android/systemui/qs/customize/TileAdapter.java | 6 +----- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml index 1124a9220a2c4..d7a9edcbc31f1 100644 --- a/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml +++ b/packages/SystemUI/res/drawable/qs_customize_tile_decoration.xml @@ -13,5 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. --> - \ No newline at end of file + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/qs_customize_divider.xml b/packages/SystemUI/res/layout/qs_customize_divider.xml index d6664fefe2da8..035f493271f7e 100644 --- a/packages/SystemUI/res/layout/qs_customize_divider.xml +++ b/packages/SystemUI/res/layout/qs_customize_divider.xml @@ -20,8 +20,9 @@ android:id="@android:id/title" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginTop="8dp" android:gravity="center" - android:paddingTop="20dp" - android:paddingBottom="13dp" + android:paddingTop="24dp" + android:paddingBottom="24dp" android:textAppearance="@style/TextAppearance.QSEdit.Headers" android:text="@string/drag_to_add_tiles" /> diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml index 6a1be81dadf56..8ca1b8e856343 100644 --- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml +++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml @@ -27,9 +27,9 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" - android:layout_marginLeft="@dimen/notification_side_paddings" - android:layout_marginRight="@dimen/notification_side_paddings" android:orientation="vertical" + android:paddingStart="@dimen/qs_customize_internal_side_paddings" + android:paddingEnd="@dimen/qs_customize_internal_side_paddings" android:background="@drawable/qs_customizer_background"> 54dp + 8dp 18dp -1dp 56dp diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java index fe0e56c4869ef..12c6906d87f71 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java @@ -690,11 +690,7 @@ public class TileAdapter extends RecyclerView.Adapter implements TileSta continue; } - final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child - .getLayoutParams(); - final int top = child.getTop() + params.topMargin + - Math.round(ViewCompat.getTranslationY(child)); - // Draw full width, in case there aren't tiles all the way across. + final int top = child.getTop() + Math.round(ViewCompat.getTranslationY(child)); mDrawable.setBounds(0, top, width, bottom); mDrawable.draw(c); break;