1<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2023 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<merge xmlns:android="http://schemas.android.com/apk/res/android" 16 xmlns:launcher="http://schemas.android.com/apk/res-auto"> 17 18 <LinearLayout 19 android:id="@+id/widgets_two_pane_sheet_paged_view" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent" 22 android:gravity="start" 23 android:layout_gravity="start" 24 android:clipChildren="false" 25 android:clipToPadding="false" 26 android:layout_alignParentStart="true" 27 android:orientation="vertical"> 28 <!-- SearchAndRecommendationsView without the tab layout as well --> 29 <!-- Note: the horizontal padding matches with the WidgetPagedView --> 30 <LinearLayout 31 android:id="@+id/search_and_recommendations_container" 32 android:layout_width="match_parent" 33 android:layout_height="wrap_content" 34 android:clipToOutline="true" 35 android:elevation="1dp" 36 android:background="?attr/widgetPickerPrimarySurfaceColor" 37 android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane" 38 android:orientation="vertical"> 39 40 <LinearLayout 41 android:id="@+id/search_bar_container" 42 android:layout_width="match_parent" 43 android:layout_height="wrap_content" 44 android:orientation="horizontal" 45 android:background="?attr/widgetPickerPrimarySurfaceColor" 46 android:gravity="center_vertical" 47 android:layout_marginBottom="8dp" 48 launcher:layout_sticky="true"> 49 <FrameLayout 50 android:layout_width="0dp" 51 android:layout_height="wrap_content" 52 android:layout_weight="1" 53 android:clipToPadding="false" 54 android:elevation="0.1dp" 55 android:paddingBottom="8dp"> 56 57 <include layout="@layout/widgets_search_bar" /> 58 </FrameLayout> 59 60 <ImageButton 61 android:id="@+id/widget_picker_widget_options_menu" 62 android:layout_width="48dp" 63 android:layout_height="48dp" 64 android:layout_marginStart="8dp" 65 android:layout_marginBottom="8dp" 66 android:layout_gravity="bottom" 67 android:background="@drawable/full_rounded_transparent_ripple" 68 android:contentDescription="@string/widget_picker_widget_options_button_description" 69 android:padding="12dp" 70 android:src="@drawable/ic_more_vert_dots" 71 android:visibility="gone" 72 android:tint="?attr/widgetPickerWidgetOptionsMenuColor" /> 73 </LinearLayout> 74 75 <FrameLayout 76 android:layout_width="match_parent" 77 android:layout_height="match_parent" 78 android:id="@+id/suggestions_header" 79 android:orientation="horizontal" 80 android:background="?attr/widgetPickerPrimarySurfaceColor" 81 launcher:layout_sticky="true"> 82 </FrameLayout> 83 84 <com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip 85 android:id="@+id/tabs" 86 android:layout_width="match_parent" 87 android:layout_height="64dp" 88 android:gravity="center_horizontal" 89 android:orientation="horizontal" 90 android:paddingVertical="8dp" 91 android:background="?attr/widgetPickerPrimarySurfaceColor" 92 style="@style/TextHeadline" 93 launcher:layout_sticky="true"> 94 95 <Button 96 android:id="@+id/tab_personal" 97 android:layout_width="0dp" 98 android:layout_height="match_parent" 99 android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding" 100 android:layout_weight="1" 101 android:background="@drawable/widget_picker_tabs_background" 102 android:text="@string/widgets_full_sheet_personal_tab" 103 android:textColor="@color/widget_picker_tab_text" 104 android:textSize="14sp" 105 style="?android:attr/borderlessButtonStyle" /> 106 107 <Button 108 android:id="@+id/tab_work" 109 android:layout_width="0dp" 110 android:layout_height="match_parent" 111 android:layout_marginEnd="@dimen/widget_tabs_button_horizontal_padding" 112 android:layout_weight="1" 113 android:background="@drawable/widget_picker_tabs_background" 114 android:text="@string/widgets_full_sheet_work_tab" 115 android:textColor="@color/widget_picker_tab_text" 116 android:textSize="14sp" 117 style="?android:attr/borderlessButtonStyle" /> 118 119 </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip> 120 </LinearLayout> 121 <!-- Note: the paddingHorizontal has to be on WidgetPagedView level so that talkback 122 correctly orders the lists to be after the search and suggestions header. See b/209579563. 123 --> 124 <com.android.launcher3.widget.picker.WidgetPagedView 125 android:id="@+id/widgets_view_pager" 126 android:layout_width="match_parent" 127 android:layout_height="match_parent" 128 android:clipToPadding="false" 129 android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane" 130 android:descendantFocusability="afterDescendants" 131 launcher:pageIndicator="@+id/tabs" > 132 133 <com.android.launcher3.widget.picker.WidgetsRecyclerView 134 android:id="@+id/primary_widgets_list_view" 135 android:layout_width="match_parent" 136 android:layout_height="match_parent" 137 android:clipToPadding="false" /> 138 139 <com.android.launcher3.widget.picker.WidgetsRecyclerView 140 android:id="@+id/work_widgets_list_view" 141 android:layout_width="match_parent" 142 android:layout_height="match_parent" 143 android:clipToPadding="false" /> 144 145 </com.android.launcher3.widget.picker.WidgetPagedView> 146 147 <com.android.launcher3.widget.picker.WidgetsRecyclerView 148 android:id="@+id/search_widgets_list_view" 149 android:layout_width="match_parent" 150 android:layout_height="match_parent" 151 android:clipToPadding="false" 152 android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane" 153 android:visibility="gone" /> 154 </LinearLayout> 155</merge> 156