commit | 293d51879a85f7ab93a2634aef98637f35fc9c1a | [log] [tgz] |
---|---|---|
author | Steven Ng <stevenckng@google.com> | Thu May 06 22:13:18 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 06 22:13:18 2021 +0000 |
tree | 322edc1b60d83baff5c099f7eda69d6e628c8a4f | |
parent | 41077b8c063d2d46741d01d044f6e7d78a1a8ff5 [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: I080da891e694a0cab8f9d56f6d253524168937f6
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); } }