commit | 78a3d40703c09e0e7bc9b3eb21e279bc5efc7b5c | [log] [tgz] |
---|---|---|
author | Steven Ng <stevenckng@google.com> | Thu May 06 22:13:36 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 06 22:13:36 2021 +0000 |
tree | 6061f29da6991f71e93a5b38acf22f3a5ab5874a | |
parent | 8fb9fd76c357be7f9360c1630d166736f5673fa5 [diff] | |
parent | 1b28e6d40a28bd8d425e269567cf03fda930a94d [diff] |
Merge "Only show collapse handle when the bottom widgets picker is scrollable" into sc-dev am: 1b28e6d40a Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14453618 Change-Id: Ie103ef153b2480d8c973818524ca4ceb5d6b7a47
diff --git a/res/layout/widgets_bottom_sheet_content.xml b/res/layout/widgets_bottom_sheet_content.xml index a9d523a..85c6488 100644 --- a/res/layout/widgets_bottom_sheet_content.xml +++ b/res/layout/widgets_bottom_sheet_content.xml
@@ -15,10 +15,12 @@ --> <merge xmlns:android="http://schemas.android.com/apk/res/android"> <View + android:id="@+id/collapse_handle" android:layout_width="48dp" android:layout_height="2dp" android:layout_gravity="center_horizontal" android:layout_marginBottom="16dp" + android:visibility="gone" android:background="?android:attr/textColorSecondary"/> <TextView style="@style/TextHeadline"
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java index f18b63e..995ac47 100644 --- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java +++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -118,6 +118,7 @@ ViewGroup.LayoutParams layoutParams = widgetsTableScrollView.getLayoutParams(); layoutParams.height = mMaxTableHeight; widgetsTableScrollView.setLayoutParams(layoutParams); + findViewById(R.id.collapse_handle).setVisibility(VISIBLE); } }