add_item_confirmation_activity.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  20. android:layout_width="match_parent"
  21. android:layout_height="match_parent"
  22. android:orientation="vertical">
  23. <ScrollView
  24. android:layout_width="match_parent"
  25. android:layout_height="0dp"
  26. android:layout_weight="1"
  27. android:clipToPadding="false">
  28. <LinearLayout
  29. android:layout_width="match_parent"
  30. android:layout_height="wrap_content"
  31. android:orientation="vertical">
  32. <TextView
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:paddingBottom="20dp"
  36. android:paddingLeft="24dp"
  37. android:paddingRight="24dp"
  38. android:paddingTop="4dp"
  39. android:text="@string/add_item_request_drag_hint" />
  40. <FrameLayout
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:background="?android:attr/colorPrimaryDark"
  44. android:theme="?attr/widgetsTheme">
  45. <com.android.launcher3.dragndrop.LivePreviewWidgetCell
  46. android:id="@+id/widget_cell"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:layout_gravity="center_horizontal"
  50. android:layout_weight="1"
  51. android:background="?android:attr/colorPrimaryDark"
  52. android:focusable="true"
  53. android:gravity="center_horizontal"
  54. android:orientation="vertical" >
  55. <include layout="@layout/widget_cell_content" />
  56. </com.android.launcher3.dragndrop.LivePreviewWidgetCell>
  57. </FrameLayout>
  58. </LinearLayout>
  59. </ScrollView>
  60. <LinearLayout
  61. style="?android:attr/buttonBarStyle"
  62. android:layout_width="match_parent"
  63. android:layout_height="wrap_content"
  64. android:gravity="end"
  65. android:paddingBottom="4dp"
  66. android:paddingEnd="12dp"
  67. android:paddingStart="12dp"
  68. android:paddingTop="4dp" >
  69. <Button
  70. style="?android:attr/buttonBarButtonStyle"
  71. android:layout_width="wrap_content"
  72. android:layout_height="wrap_content"
  73. android:onClick="onCancelClick"
  74. android:text="@android:string/cancel" />
  75. <Button
  76. style="?android:attr/buttonBarButtonStyle"
  77. android:layout_width="wrap_content"
  78. android:layout_height="wrap_content"
  79. android:onClick="onPlaceAutomaticallyClick"
  80. android:text="@string/place_automatically" />
  81. </LinearLayout>
  82. </LinearLayout>