fragment_ballot_wizard1.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:id="@+id/layout_wizard2"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:orientation="vertical"
  8. android:paddingLeft="@dimen/tablet_additional_padding_left_right"
  9. android:paddingRight="@dimen/tablet_additional_padding_left_right"
  10. android:background="?android:attr/colorBackground">
  11. <TextView
  12. style="@style/Threema.TextAppearance.Headline"
  13. android:id="@+id/wizard_title"
  14. android:layout_width="wrap_content"
  15. android:layout_height="wrap_content"
  16. android:layout_marginTop="16dp"
  17. android:paddingLeft="16dp"
  18. android:paddingRight="16dp"
  19. android:text="@string/ballot_add_choices"
  20. android:textColor="?attr/colorPrimary"
  21. />
  22. <androidx.recyclerview.widget.RecyclerView
  23. android:id="@+id/ballot_list"
  24. android:layout_width="match_parent"
  25. android:layout_height="0dp"
  26. android:layout_weight="1"
  27. android:layout_marginTop="14dp"
  28. android:divider="@android:color/transparent"
  29. android:dividerHeight="2dp"
  30. />
  31. <RelativeLayout
  32. android:id="@+id/item_container"
  33. android:layout_width="match_parent"
  34. android:layout_height="@dimen/ballotchoice_list_entry_height"
  35. android:layout_marginBottom="@dimen/ballotchoice_bottom_margin"
  36. android:paddingLeft="8dp"
  37. android:paddingRight="8dp"
  38. android:layout_marginTop="2dp"
  39. android:background="?android:attr/colorBackground"
  40. android:minHeight="@dimen/ballotchoice_list_entry_height">
  41. <com.google.android.material.textfield.TextInputLayout
  42. style="@style/Threema.TextInputLayout.Compose"
  43. android:id="@+id/textinputlayout_compose"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. android:layout_alignParentLeft="true"
  47. android:layout_centerVertical="true"
  48. android:layout_toLeftOf="@+id/create_choice"
  49. android:layout_gravity="bottom"
  50. android:outlineProvider="none">
  51. <ch.threema.app.ui.ComposeEditText
  52. style="@style/Threema.EditText.Compose"
  53. android:id="@+id/create_choice_name"
  54. android:layout_width="match_parent"
  55. android:layout_height="wrap_content"
  56. android:hint="@string/ballot_choice_add"
  57. android:imeActionId="@integer/ime_wizard_add_choice"
  58. android:imeActionLabel="+"
  59. android:minHeight="@dimen/input_text_height"
  60. android:paddingLeft="16dp"
  61. android:paddingTop="3dp"
  62. android:paddingRight="80dp"
  63. android:paddingBottom="4dp"
  64. android:nextFocusDown="@id/create_choice_name"
  65. android:singleLine="true"
  66. android:textSize="16sp"
  67. android:inputType="text" />
  68. </com.google.android.material.textfield.TextInputLayout>
  69. <ImageButton
  70. style="?android:attr/borderlessButtonStyle"
  71. android:id="@+id/add_date"
  72. android:layout_width="@dimen/emoji_button_width"
  73. android:layout_height="@dimen/emoji_button_width"
  74. android:layout_toLeftOf="@+id/add_time"
  75. android:drawablePadding="0dp"
  76. android:layout_centerVertical="true"
  77. android:contentDescription="@string/insert_date"
  78. app:srcCompat="@drawable/ic_event"
  79. android:background="@drawable/selector_compose_button"
  80. app:tint="?attr/colorOnSurface" />
  81. <ImageButton
  82. style="?android:attr/borderlessButtonStyle"
  83. android:id="@+id/add_time"
  84. android:layout_width="@dimen/emoji_button_width"
  85. android:layout_height="@dimen/emoji_button_width"
  86. android:layout_toLeftOf="@+id/create_choice"
  87. android:drawablePadding="0dp"
  88. android:layout_centerVertical="true"
  89. android:contentDescription="@string/insert_datetime"
  90. app:srcCompat="@drawable/ic_schedule"
  91. android:background="@drawable/selector_compose_button"
  92. app:tint="?attr/colorOnSurface" />
  93. <ImageButton
  94. style="?android:attr/borderlessButtonStyle"
  95. android:id="@+id/create_choice"
  96. android:layout_width="@dimen/emoji_button_width"
  97. android:layout_height="@dimen/emoji_button_width"
  98. android:layout_alignParentRight="true"
  99. android:layout_centerVertical="true"
  100. android:drawablePadding="0dp"
  101. app:srcCompat="@drawable/ic_add_circle_black_24dp"
  102. app:tint="@drawable/selector_button_tint"
  103. android:contentDescription="@string/add_answer"
  104. android:background="@drawable/selector_compose_button"
  105. />
  106. </RelativeLayout>
  107. </LinearLayout>