Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ class PollQuestionViewHolder<T : ViewBinding>(
private fun bind(questionUi: QuestionUi.QuestionCreator) {
with(binding as LayoutPollQuestionCreationItemBinding) {
binding.applyTheme()
notRequiredToAnswer.setOnCheckedChangeListener { _, b ->
Comment thread
stanwolverine marked this conversation as resolved.
getItem(bindingAdapterPosition).currentQuestion.requiredToAnswer = b
}
// <-- Removed `notRequiredToAnswer` switch for platform parity -->
// notRequiredToAnswer.setOnCheckedChangeListener { _, b ->
// getItem(bindingAdapterPosition).currentQuestion.requiredToAnswer = b
// }
binding.askAQuestionEditText.setText(questionUi.currentQuestion.withTitle)
binding.askAQuestionEditText.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
Expand Down
3 changes: 2 additions & 1 deletion room-kit/src/main/java/live/hms/roomkit/ui/theme/ThemeExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,8 @@ fun LayoutPollQuestionCreationItemBinding.applyTheme() {
)
)

setSwitchThemes(notRequiredToAnswer)
// <-- Removed "Not Required To Answer" switch for platform parity -->
// setSwitchThemes(notRequiredToAnswer)

saveButton.saveButtonEnabled()

Expand Down
25 changes: 13 additions & 12 deletions room-kit/src/main/res/layout/layout_poll_question_creation_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,28 +124,29 @@
android:textSize="14sp"
android:fontFamily="@font/inter_regular"
android:lineHeight="20sp"
app:layout_constraintBottom_toTopOf="@id/notRequiredToAnswer"
app:layout_constraintBottom_toTopOf="@id/border"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/optionsListRadioGroupVG" />

<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/notRequiredToAnswer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Not required to answer"
app:layout_constraintBottom_toTopOf="@+id/border"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addAnOptionTextView"
tools:visibility="visible" />
<!-- Removed `notRequiredToAnswer` switch for platform parity -->
<!-- <com.google.android.material.switchmaterial.SwitchMaterial-->
<!-- android:id="@+id/notRequiredToAnswer"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:text="Not required to answer"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/border"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/addAnOptionTextView"-->
<!-- tools:visibility="visible" />-->

<View
android:id="@+id/border"
android:layout_width="match_parent"
android:layout_height="0.5px"
app:layout_constraintBottom_toTopOf="@id/saveButton"
app:layout_constraintTop_toBottomOf="@id/notRequiredToAnswer"
app:layout_constraintTop_toBottomOf="@id/addAnOptionTextView"
android:layout_marginVertical="@dimen/spacing_d1"
android:background="@drawable/gray_line_vertical_divider" />

Expand Down