Android-Hint-Spinner
Android-Hint-Spinner copied to clipboard
Checking for emptiness
Hi, how can I check if the user has selected an option? I want to make this field mandatory on an alert dialog and throw a message if the user has not selected any option. Thank you
Hi,
It should be possible using HintAdapter#getHintPosition
. I think this test matches your use case.
https://github.com/srodrigo/Android-Hint-Spinner/blob/5ca10eae96d01bfd14f27467774d664c60be5cb9/library/src/androidTest/java/me/srodrigo/androidhintspinner/HintSpinnerTest.java#L117
Thank you.