diff --git a/res/drawable/bg_widgets_content.xml b/res/drawable/bg_widgets_content.xml index 80604308ac..b0b699ba22 100644 --- a/res/drawable/bg_widgets_content.xml +++ b/res/drawable/bg_widgets_content.xml @@ -18,16 +18,32 @@ + + + + + + + + + + + + + + + + @@ -38,8 +54,6 @@ diff --git a/res/layout/widgets_full_sheet_large_screen.xml b/res/layout/widgets_full_sheet_large_screen.xml index 1c0037d698..b99ac5ca6d 100644 --- a/res/layout/widgets_full_sheet_large_screen.xml +++ b/res/layout/widgets_full_sheet_large_screen.xml @@ -31,22 +31,11 @@ android:id="@+id/recycler_view_container" android:layout_width="0dp" android:layout_height="0dp" - app:layout_constraintEnd_toStartOf="@id/right_pane" app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@id/title" app:layout_constraintWidth_percent="0.33"> - - - - - + - + android:layout_height="match_parent" + android:gravity="center" + android:textSize="18sp" + android:visibility="gone" + tools:text="No widgets available" /> + + + + { mWidgetsListTableViewHolderBinder.bindViewHolder(widgetsRowViewHolder, contentEntry, - 0, Collections.singletonList(data)); + ViewHolderBinder.POSITION_FIRST | ViewHolderBinder.POSITION_LAST, + Collections.singletonList(data)); }; mRightPane.removeAllViews(); mRightPane.addView(widgetsRowViewHolder.itemView); diff --git a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java index 4c1f7a9954..2e8f0ab1f8 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java +++ b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java @@ -15,9 +15,6 @@ */ package com.android.launcher3.widget.picker; -import static com.android.launcher3.widget.picker.WidgetsListDrawableState.LAST; -import static com.android.launcher3.widget.picker.WidgetsListDrawableState.MIDDLE; - import android.graphics.Bitmap; import android.util.Log; import android.util.Pair; @@ -84,7 +81,11 @@ public final class WidgetsListTableViewHolderBinder Log.d(TAG, String.format("onBindViewHolder [widget#=%d, table.getChildCount=%d]", entry.mWidgets.size(), table.getChildCount())); } - table.setListDrawableState(((position & POSITION_LAST) != 0) ? LAST : MIDDLE); + table.setListDrawableState( + WidgetsListDrawableState.obtain( + (position & POSITION_FIRST) != 0, + (position & POSITION_LAST) != 0)); + List> widgetItemsTable = WidgetsTableUtils.groupWidgetItemsIntoTableWithReordering( entry.mWidgets, entry.getMaxSpanSizeInCells());