Implement two pane widget picker

The widget picker design is currently not optimized for large screen form factor devices.
We resolve that by adding a two pane widget picker like that of the design in go/widget-picker-2023.

Bug: 256684299
Test: Make sure to be on a tablet in landscape mode.
        1.Turn on flag LARGE_SCREEN_WIDGET_PICKER.
        2. Press and hold on an empty spot in workspace until the popup menu appears.
        3. Click widgets.
        4. Notice the new two pane layout
Change-Id: Ia3ea17dc320f72f9bc5dea52399ff51d9161602b
This commit is contained in:
Federico Baron
2022-11-17 09:29:51 -08:00
parent 7b7130db3d
commit 4b1a38bb7d
18 changed files with 653 additions and 34 deletions

View File

@@ -63,6 +63,9 @@ public abstract class FastScrollRecyclerView extends RecyclerView {
public void bindFastScrollbar() {
ViewGroup parent = (ViewGroup) getParent().getParent();
if (parent.findViewById(R.id.fast_scroller) == null) {
parent = (ViewGroup) parent.getParent();
}
mScrollbar = parent.findViewById(R.id.fast_scroller);
mScrollbar.setRecyclerView(this, parent.findViewById(R.id.fast_scroller_popup));
onUpdateScrollbar(0);