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_margin="16dp" 75 android:background="@drawable/widgets_surface_background" 76 android:layout_weight="1"> 77 78 <include 79 android:id="@+id/widget_cell" 80 layout="@layout/widget_cell" 81 android:layout_width="match_parent" 82 android:layout_height="wrap_content" 83 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" /> 84 </ScrollView> 85 86 <LinearLayout 87 android:id="@+id/actions_container" 88 android:layout_width="match_parent" 89 android:layout_height="wrap_content" 90 android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" 91 android:gravity="center_vertical|end" 92 android:paddingVertical="8dp" 93 android:orientation="horizontal"> 94 <Button 95 style="@style/Button.FullRounded.Colored" 96 android:layout_width="wrap_content" 97 android:layout_height="wrap_content" 98 android:paddingHorizontal="16dp" 99 android:textSize="14sp" 100 android:maxLines="2" 101 android:ellipsize="end" 102 android:textColor="@color/button_text" 103 android:text="@android:string/cancel" 104 android:onClick="onCancelClick"/> 105 106 <Space 107 android:layout_width="8dp" 108 android:layout_height="wrap_content" /> 109 110 <Button 111 style="@style/Button.FullRounded.Colored" 112 android:layout_width="wrap_content" 113 android:layout_height="wrap_content" 114 android:paddingHorizontal="16dp" 115 android:textSize="14sp" 116 android:maxLines="2" 117 android:ellipsize="end" 118 android:textColor="@color/button_text" 119 android:text="@string/add_to_home_screen" 120 android:onClick="onPlaceAutomaticallyClick"/> 121 </LinearLayout> 122 </LinearLayout> 123 </com.android.launcher3.widget.AddItemWidgetsBottomSheet> 124 125</com.android.launcher3.dragndrop.SimpleDragLayer> 126 127 128