Material design documentation mentions about outlined dropdown menu, which looks like this:
How to create this in my Android app? In other words, I want to create a spinner with outline and hint on top.
Material design documentation mentions about outlined dropdown menu, which looks like this:
How to create this in my Android app? In other words, I want to create a spinner with outline and hint on top.
Well,there is no official libraries released till now. So, You have to custom create it. Mine seems like this attached image. I have done some simple steps.
Step 1 : Add one shape_
you can easily change your stroke color from here .
step 2 : Design the spinner _
And if you want to make your spinner selected text color something else you can do that from code .
According to the android's material design github repository, it's planned (which means that they still will start working on it) You can't find a direct way to implement this.
Result:
Fully working code below:
I tried making it with border like below.
Set spinner in activity
Create border.xml in drawable
And populate it in any way you want.
I don't know how to put title to the spinner though.
Result seems like this.
Little adjustments and I think you can create what you are looking for.
They've updated material design library:
This is the link: https://material.io/develop/android/components/menu/
Add this if not work
<androidx.appcompat.widget.AppCompatAutoCompleteTextView