commit | bf2b94ed263865fd9e71041d085f456a423d5a54 | [log] [tgz] |
---|---|---|
author | Steven Ng <stevenckng@google.com> | Thu May 06 22:13:48 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 06 22:13:48 2021 +0000 |
tree | 461508893710cf959f90ee36ce7267b7603e6e19 | |
parent | c24ab51afb1deb88b4a53b0293a01715773fe631 [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: I297d4d774034c9db2a4b2e7ec05eaddba505913c
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); } }