MaterialSpinner
MaterialSpinner copied to clipboard
MaterialSpinner Hint
Seems to be no way to set a Hint. This would be useful for initialising the items dropdown with a pre-defined String i.e. "Please Select" or "Choose one"
You can set a Hint. You need to set items into the MaterialSpinner first. This is how it works.
YourActivity.kt
// Your Code
materialSpinner.setItems(arrayListOf("Option 1","Option 2","Option 3"))
_// Rest of Your Code_
YourLayout.xml
<com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/material_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:ms_hint="Your Hint"/> <!-- Insert your hint -->
Hope it helps.