1<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2022 The Android Open Source Project 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14--> 15<com.android.launcher3.widget.picker.WidgetsTwoPaneSheet 16 xmlns:android="http://schemas.android.com/apk/res/android" 17 xmlns:tools="http://schemas.android.com/tools" 18 android:layout_width="match_parent" 19 android:layout_height="match_parent" 20 android:orientation="vertical" 21 android:theme="?attr/widgetsTheme"> 22 23 <com.android.launcher3.views.SpringRelativeLayout 24 android:id="@+id/container" 25 android:layout_width="match_parent" 26 android:layout_height="match_parent" 27 android:focusable="true" 28 android:importantForAccessibility="no"> 29 30 <View 31 android:id="@+id/collapse_handle" 32 android:layout_width="@dimen/bottom_sheet_handle_width" 33 android:layout_height="@dimen/bottom_sheet_handle_height" 34 android:layout_marginTop="@dimen/bottom_sheet_handle_margin" 35 android:layout_centerHorizontal="true" 36 android:background="@drawable/widget_picker_collapse_handle"/> 37 38 <TextView 39 android:id="@+id/title" 40 android:layout_width="match_parent" 41 android:layout_height="wrap_content" 42 android:layout_marginTop="24dp" 43 android:gravity="center_horizontal" 44 android:layout_below="@id/collapse_handle" 45 android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane" 46 android:text="@string/widget_button_text" 47 android:textColor="?attr/widgetPickerTitleColor" 48 android:textSize="24sp" /> 49 50 <LinearLayout 51 android:id="@+id/linear_layout_container" 52 android:layout_width="match_parent" 53 android:layout_height="match_parent" 54 android:layout_below="@id/title"> 55 56 <FrameLayout 57 android:id="@+id/recycler_view_container" 58 android:layout_width="0dp" 59 android:layout_height="match_parent" 60 android:layout_gravity="start" 61 android:layout_weight="0.33"> 62 <TextView 63 android:id="@+id/fast_scroller_popup" 64 style="@style/FastScrollerPopup" 65 android:layout_marginEnd="@dimen/fastscroll_popup_margin" /> 66 67 <!-- Fast scroller popup --> 68 <com.android.launcher3.views.RecyclerViewFastScroller 69 android:id="@+id/fast_scroller" 70 android:layout_width="@dimen/fastscroll_width" 71 android:layout_height="match_parent" 72 android:layout_marginEnd="@dimen/fastscroll_end_margin" /> 73 74 <com.android.launcher3.widget.picker.WidgetsRecyclerView 75 android:id="@+id/search_widgets_list_view" 76 android:layout_width="match_parent" 77 android:layout_height="wrap_content" 78 android:clipToPadding="false" 79 android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane" 80 android:visibility="gone" /> 81 </FrameLayout> 82 83 <FrameLayout 84 android:id="@+id/right_pane_container" 85 android:layout_width="0dp" 86 android:layout_height="match_parent" 87 android:layout_weight="0.67" 88 android:layout_marginEnd="@dimen/widget_list_horizontal_margin_two_pane" 89 android:paddingTop="@dimen/widget_list_horizontal_margin_two_pane" 90 android:gravity="end" 91 android:layout_gravity="end" 92 android:orientation="horizontal"> 93 <TextView 94 android:id="@+id/no_widgets_text" 95 style="@style/PrimaryHeadline" 96 android:layout_width="match_parent" 97 android:layout_height="match_parent" 98 android:gravity="center" 99 android:textSize="18sp" 100 android:visibility="gone" 101 tools:text="No widgets available" /> 102 <ScrollView 103 android:id="@+id/right_pane_scroll_view" 104 android:layout_width="match_parent" 105 android:layout_height="match_parent" 106 android:fillViewport="true"> 107 <LinearLayout 108 android:orientation="vertical" 109 android:layout_width="match_parent" 110 android:layout_height="wrap_content" 111 android:gravity="center_vertical" 112 android:clipToOutline="true" 113 android:paddingBottom="36dp" 114 android:background="@drawable/widgets_surface_background" 115 android:id="@+id/right_pane"> 116 <com.android.launcher3.widget.picker.WidgetsRecommendationTableLayout 117 android:id="@+id/recommended_widget_table" 118 android:layout_width="match_parent" 119 android:layout_height="wrap_content" 120 android:paddingHorizontal= 121 "@dimen/widget_list_horizontal_margin_two_pane" 122 android:visibility="gone" /> 123 </LinearLayout> 124 </ScrollView> 125 </FrameLayout> 126 </LinearLayout> 127 </com.android.launcher3.views.SpringRelativeLayout> 128</com.android.launcher3.widget.picker.WidgetsTwoPaneSheet> 129