1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4** Copyright 2017, The Android Open Source Project 5** 6** Licensed under the Apache License, Version 2.0 (the "License"); 7** you may not use this file except in compliance with the License. 8** You may obtain a copy of the License at 9** 10** http://www.apache.org/licenses/LICENSE-2.0 11** 12** Unless required by applicable law or agreed to in writing, software 13** distributed under the License is distributed on an "AS IS" BASIS, 14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15** See the License for the specific language governing permissions and 16** limitations under the License. 17*/ 18--> 19<com.android.launcher3.dragndrop.SimpleDragLayer 20 xmlns:android="http://schemas.android.com/apk/res/android" 21 android:id="@+id/add_item_drag_layer" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 android:clipChildren="false" 25 android:clipToPadding="false" 26 android:importantForAccessibility="no"> 27 28 <com.android.launcher3.widget.AddItemWidgetsBottomSheet 29 android:id="@+id/add_item_bottom_sheet" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:theme="?attr/widgetsTheme" 33 android:layout_gravity="bottom" 34 android:orientation="vertical"> 35 36 <LinearLayout 37 android:id="@+id/add_item_bottom_sheet_content" 38 android:layout_width="match_parent" 39 android:layout_height="wrap_content" 40 android:paddingVertical="24dp" 41 android:background="@drawable/add_item_dialog_background" 42 android:orientation="vertical" > 43 44 <TextView 45 style="@style/TextHeadline" 46 android:id="@+id/widget_appName" 47 android:layout_width="match_parent" 48 android:layout_height="wrap_content" 49 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" 50 android:gravity="center_horizontal" 51 android:textColor="?android:attr/textColorPrimary" 52 android:textSize="24sp" 53 android:ellipsize="end" 54 android:fadingEdge="horizontal" 55 android:singleLine="true" 56 android:maxLines="1" /> 57 58 <TextView 59 android:id="@+id/widget_drag_instruction" 60 android:layout_width="match_parent" 61 android:layout_height="wrap_content" 62 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" 63 android:gravity="center_horizontal" 64 android:paddingTop="8dp" 65 android:text="@string/add_item_request_drag_hint" 66 android:textSize="14sp" 67 android:textColor="?android:attr/textColorSecondary" 68 android:alpha="0.7"/> 69 70 <ScrollView 71 android:id="@+id/widget_preview_scroll_view" 72 android:layout_width="match_parent" 73 android:layout_height="0dp" 74 android:layout_marginVertical="16dp" 75 android:layout_weight="1"> 76 77 <include 78 android:id="@+id/widget_cell" 79 layout="@layout/widget_cell" 80 android:layout_width="match_parent" 81 android:layout_height="wrap_content" 82 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" /> 83 </ScrollView> 84 85 <LinearLayout 86 android:id="@+id/actions_container" 87 android:layout_width="match_parent" 88 android:layout_height="wrap_content" 89 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" 90 android:gravity="center_vertical|end" 91 android:paddingVertical="8dp" 92 android:orientation="horizontal"> 93 <Button 94 style="@style/Button.FullRounded.Colored" 95 android:layout_width="wrap_content" 96 android:layout_height="wrap_content" 97 android:paddingHorizontal="16dp" 98 android:textSize="14sp" 99 android:maxLines="2" 100 android:ellipsize="end" 101 android:textColor="@color/button_text" 102 android:text="@android:string/cancel" 103 android:onClick="onCancelClick"/> 104 105 <Space 106 android:layout_width="8dp" 107 android:layout_height="wrap_content" /> 108 109 <Button 110 style="@style/Button.FullRounded.Colored" 111 android:layout_width="wrap_content" 112 android:layout_height="wrap_content" 113 android:paddingHorizontal="16dp" 114 android:textSize="14sp" 115 android:maxLines="2" 116 android:ellipsize="end" 117 android:textColor="@color/button_text" 118 android:text="@string/add_to_home_screen" 119 android:onClick="onPlaceAutomaticallyClick"/> 120 </LinearLayout> 121 </LinearLayout> 122 </com.android.launcher3.widget.AddItemWidgetsBottomSheet> 123 124</com.android.launcher3.dragndrop.SimpleDragLayer> 125 126 127