niu_actions_dialog.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (C) 2021 The Android Open Source Project
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. -->
  13. <LinearLayout
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. xmlns:app="http://schemas.android.com/apk/res-auto"
  16. android:id="@+id/niu_actions_dialog_layout"
  17. android:layout_width="match_parent"
  18. android:layout_height="match_parent"
  19. android:orientation="horizontal"
  20. android:layout_gravity="center">
  21. <Space
  22. android:layout_width="0dp"
  23. android:layout_height="1dp"
  24. android:layout_weight="1"/>
  25. <LinearLayout
  26. android:layout_width="@dimen/modal_dialog_width"
  27. android:layout_height="wrap_content"
  28. android:background="@drawable/round_rect_dialog"
  29. android:backgroundTint="?attr/modalDialogBackground"
  30. android:orientation="vertical"
  31. android:layout_gravity="center"
  32. android:paddingTop="@dimen/modal_dialog_padding"
  33. android:paddingLeft="@dimen/modal_dialog_padding"
  34. android:paddingRight="@dimen/modal_dialog_padding"
  35. android:paddingBottom="@dimen/modal_dialog_padding_bottom">
  36. <TextView
  37. style="@style/ModalDialogTitle"
  38. android:id="@+id/niu_actions_dialog_header"/>
  39. <Space
  40. android:layout_width="0dp"
  41. android:layout_height="@dimen/modal_dialog_vertical_spacer"/>
  42. <androidx.constraintlayout.widget.ConstraintLayout
  43. android:layout_width="match_parent"
  44. android:layout_height="wrap_content">
  45. <ScrollView
  46. android:layout_width="match_parent"
  47. android:layout_height="wrap_content"
  48. app:layout_constraintTop_toTopOf="parent"
  49. app:layout_constraintBottom_toBottomOf="parent"
  50. app:layout_constrainedHeight="true"
  51. app:layout_constraintHeight_max="@dimen/modal_dialog_text_height">
  52. <TextView
  53. style="@style/ModalDialogText"
  54. android:id="@+id/niu_actions_dialog_description"/>
  55. </ScrollView>
  56. </androidx.constraintlayout.widget.ConstraintLayout>
  57. <Space
  58. android:layout_width="0dp"
  59. android:layout_height="@dimen/modal_dialog_vertical_spacer"/>
  60. <LinearLayout
  61. android:layout_width="match_parent"
  62. android:layout_height="match_parent"
  63. android:orientation="horizontal">
  64. <Space
  65. android:layout_width="0dp"
  66. android:layout_height="0dp"
  67. android:layout_weight="1"/>
  68. <Button
  69. style="@style/ModalDialogButton"
  70. android:id="@+id/niu_actions_dialog_button_1"
  71. android:text="@string/dialog_cancel"/>
  72. <Button
  73. style="@style/ModalDialogButton"
  74. android:id="@+id/niu_actions_dialog_button_2"
  75. android:text="@string/dialog_acknowledge"/>
  76. </LinearLayout>
  77. </LinearLayout>
  78. <Space
  79. android:layout_width="0dp"
  80. android:layout_height="1dp"
  81. android:layout_weight="1" />
  82. </LinearLayout>