Skip to content

Commit

Permalink
Show dropdown once answer is cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
FikriMilano committed Jan 28, 2025
1 parent fcf841e commit 12fb10b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import android.widget.ArrayAdapter
import android.widget.FrameLayout
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.doOnNextLayout
import androidx.lifecycle.lifecycleScope
import com.google.android.fhir.datacapture.R
import com.google.android.fhir.datacapture.extensions.displayString
Expand Down Expand Up @@ -75,6 +76,7 @@ internal object DropDownViewHolderFactory :
context.lifecycleScope.launch {
delay(200) // to show ripple effect on the icon before clearing the answer
questionnaireViewItem.clearAnswer()
autoCompleteTextView.doOnNextLayout { autoCompleteTextView.showDropDown() }
}
}
}
Expand Down

0 comments on commit 12fb10b

Please sign in to comment.