add_item_confirmation_activity.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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:paddingVertical="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:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
  47. android:gravity="center_horizontal"
  48. android:textColor="?android:attr/textColorPrimary"
  49. android:textSize="24sp"
  50. android:ellipsize="end"
  51. android:fadingEdge="horizontal"
  52. android:singleLine="true"
  53. android:maxLines="1" />
  54. <TextView
  55. android:id="@+id/widget_drag_instruction"
  56. android:layout_width="match_parent"
  57. android:layout_height="wrap_content"
  58. android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
  59. android:gravity="center_horizontal"
  60. android:paddingTop="8dp"
  61. android:text="@string/add_item_request_drag_hint"
  62. android:textSize="14sp"
  63. android:textColor="?android:attr/textColorSecondary"
  64. android:alpha="0.7"/>
  65. <ScrollView
  66. android:id="@+id/widget_preview_scroll_view"
  67. android:layout_width="match_parent"
  68. android:layout_height="0dp"
  69. android:layout_marginVertical="16dp"
  70. android:layout_weight="1">
  71. <include
  72. android:id="@+id/widget_cell"
  73. layout="@layout/widget_cell"
  74. android:layout_width="match_parent"
  75. android:layout_height="wrap_content"
  76. android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin" />
  77. </ScrollView>
  78. <LinearLayout
  79. android:id="@+id/actions_container"
  80. android:layout_width="match_parent"
  81. android:layout_height="wrap_content"
  82. android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin"
  83. android:gravity="center_vertical|end"
  84. android:paddingVertical="8dp"
  85. android:orientation="horizontal">
  86. <Button
  87. style="@style/Button.FullRounded.Colored"
  88. android:layout_width="wrap_content"
  89. android:layout_height="wrap_content"
  90. android:paddingHorizontal="16dp"
  91. android:textSize="14sp"
  92. android:maxLines="2"
  93. android:ellipsize="end"
  94. android:textColor="@color/button_text"
  95. android:text="@android:string/cancel"
  96. android:onClick="onCancelClick"/>
  97. <Space
  98. android:layout_width="8dp"
  99. android:layout_height="wrap_content" />
  100. <Button
  101. style="@style/Button.FullRounded.Colored"
  102. android:layout_width="wrap_content"
  103. android:layout_height="wrap_content"
  104. android:paddingHorizontal="16dp"
  105. android:textSize="14sp"
  106. android:maxLines="2"
  107. android:ellipsize="end"
  108. android:textColor="@color/button_text"
  109. android:text="@string/add_to_home_screen"
  110. android:onClick="onPlaceAutomaticallyClick"/>
  111. </LinearLayout>
  112. </LinearLayout>
  113. </com.android.launcher3.widget.AddItemWidgetsBottomSheet>
  114. </com.android.launcher3.dragndrop.AddItemDragLayer>