gesture_tutorial_dialog.xml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. <androidx.constraintlayout.widget.ConstraintLayout
  14. xmlns:android="http://schemas.android.com/apk/res/android"
  15. xmlns:app="http://schemas.android.com/apk/res-auto"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:background="@drawable/bg_sandbox_feedback"
  19. android:paddingTop="24dp"
  20. android:paddingBottom="24dp"
  21. android:paddingStart="16dp"
  22. android:paddingEnd="16dp">
  23. <TextView
  24. android:id="@+id/gesture_tutorial_dialog_title"
  25. style="@style/TextAppearance.GestureTutorial.Dialog.Title"
  26. android:layout_width="0dp"
  27. android:layout_height="wrap_content"
  28. android:text="@string/skip_tutorial_dialog_title"
  29. app:layout_constraintStart_toStartOf="parent"
  30. app:layout_constraintEnd_toEndOf="parent"
  31. app:layout_constraintTop_toTopOf="parent"/>
  32. <TextView
  33. android:id="@+id/gesture_tutorial_dialog_subtitle"
  34. style="@style/TextAppearance.GestureTutorial.Dialog.Subtitle"
  35. android:layout_width="0dp"
  36. android:layout_height="wrap_content"
  37. android:layout_marginTop="16dp"
  38. android:text="@string/skip_tutorial_dialog_subtitle"
  39. app:layout_constraintStart_toStartOf="parent"
  40. app:layout_constraintEnd_toEndOf="parent"
  41. app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_dialog_title"/>
  42. <!-- android:stateListAnimator="@null" removes shadow and normal on click behavior (increase
  43. of elevation and shadow) which is replaced by ripple effect in android:foreground -->
  44. <Button
  45. android:id="@+id/gesture_tutorial_dialog_cancel_button"
  46. style="@style/TextAppearance.GestureTutorial.CancelButtonLabel"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:layout_marginTop="46dp"
  50. android:paddingTop="8dp"
  51. android:paddingBottom="8dp"
  52. android:paddingStart="16dp"
  53. android:paddingEnd="16dp"
  54. android:background="@drawable/gesture_tutorial_cancel_button_background"
  55. android:foreground="?android:attr/selectableItemBackgroundBorderless"
  56. android:stateListAnimator="@null"
  57. android:text="@string/gesture_tutorial_action_button_label_cancel"
  58. app:layout_constraintStart_toStartOf="parent"
  59. app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_dialog_subtitle"/>
  60. <Button
  61. android:id="@+id/gesture_tutorial_dialog_confirm_button"
  62. style="@style/TextAppearance.GestureTutorial.ButtonLabel"
  63. android:layout_width="wrap_content"
  64. android:layout_height="wrap_content"
  65. android:layout_marginTop="46dp"
  66. android:paddingTop="8dp"
  67. android:paddingBottom="8dp"
  68. android:paddingStart="16dp"
  69. android:paddingEnd="16dp"
  70. android:background="@drawable/gesture_tutorial_action_button_background"
  71. android:foreground="?android:attr/selectableItemBackgroundBorderless"
  72. android:stateListAnimator="@null"
  73. android:text="@string/gesture_tutorial_action_button_label_skip"
  74. app:layout_constraintEnd_toEndOf="parent"
  75. app:layout_constraintTop_toBottomOf="@id/gesture_tutorial_dialog_subtitle"/>
  76. </androidx.constraintlayout.widget.ConstraintLayout>