add_item_confirmation_activity.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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.AddItemDragLayer
  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. <com.android.launcher3.widget.AddItemWidgetsBottomSheet
  28. android:id="@+id/add_item_bottom_sheet"
  29. android:layout_width="match_parent"
  30. android:layout_height="wrap_content"
  31. android:theme="?attr/widgetsTheme"
  32. android:layout_gravity="bottom"
  33. android:orientation="vertical">
  34. <LinearLayout
  35. android:id="@+id/add_item_bottom_sheet_content"
  36. android:layout_width="match_parent"
  37. android:layout_height="wrap_content"
  38. android:padding="24dp"
  39. android:background="@drawable/add_item_dialog_background"
  40. android:orientation="vertical" >
  41. <TextView
  42. style="@style/TextHeadline"
  43. android:id="@+id/widget_appName"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. android:gravity="center_horizontal"
  47. android:textColor="?android:attr/textColorPrimary"
  48. android:textSize="24sp"
  49. android:ellipsize="end"
  50. android:fadingEdge="horizontal"
  51. android:singleLine="true"
  52. android:maxLines="1" />
  53. <TextView
  54. android:layout_width="match_parent"
  55. android:layout_height="wrap_content"
  56. android:gravity="center_horizontal"
  57. android:paddingTop="8dp"
  58. android:text="@string/add_item_request_drag_hint"
  59. android:textSize="14sp"
  60. android:textColor="?android:attr/textColorSecondary"
  61. android:alpha="0.7"/>
  62. <include layout="@layout/widget_cell"
  63. android:id="@+id/widget_cell"
  64. android:layout_width="match_parent"
  65. android:layout_height="0dp"
  66. android:layout_weight="1"
  67. android:layout_marginVertical="16dp" />
  68. <LinearLayout
  69. android:layout_width="match_parent"
  70. android:layout_height="wrap_content"
  71. android:gravity="center_vertical|end"
  72. android:paddingVertical="8dp"
  73. android:orientation="horizontal">
  74. <Button
  75. style="@style/Button.FullRounded.Colored"
  76. android:layout_width="wrap_content"
  77. android:layout_height="36dp"
  78. android:paddingHorizontal="16dp"
  79. android:textSize="14sp"
  80. android:textColor="@color/button_text"
  81. android:text="@android:string/cancel"
  82. android:onClick="onCancelClick"/>
  83. <Space
  84. android:layout_width="8dp"
  85. android:layout_height="wrap_content" />
  86. <Button
  87. style="@style/Button.FullRounded.Colored"
  88. android:layout_width="wrap_content"
  89. android:layout_height="36dp"
  90. android:paddingHorizontal="16dp"
  91. android:textSize="14sp"
  92. android:textColor="@color/button_text"
  93. android:text="@string/add_to_home_screen"
  94. android:onClick="onPlaceAutomaticallyClick"/>
  95. </LinearLayout>
  96. </LinearLayout>
  97. </com.android.launcher3.widget.AddItemWidgetsBottomSheet>
  98. </com.android.launcher3.dragndrop.AddItemDragLayer>