MaterialSpinner icon indicating copy to clipboard operation
MaterialSpinner copied to clipboard

MaterialSpinner Hint

Open keitheyre opened this issue 4 years ago • 1 comments

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"

keitheyre avatar Jul 08 '21 09:07 keitheyre

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.

RikySaepuloh avatar Apr 18 '24 06:04 RikySaepuloh