MaterialSpinner icon indicating copy to clipboard operation
MaterialSpinner copied to clipboard

Custom adapter for Material spinner

Open divya-navsoft opened this issue 4 years ago • 4 comments

Hi @tiper really awesome library you've created. I want to add country image flag and country code as fetched from api and add custom adapter in the material spinner and show it when item selected. I have successfully created the custom adapter showing bottom dialog with image flag and code but when I'm selecting one item its only text that showing in Materialspinner. please help.

divya-navsoft avatar Jul 07 '20 06:07 divya-navsoft

ohhh, from 8 jul 2020... facepalm

LunevNF avatar Jan 22 '21 11:01 LunevNF

Hi @tiper really awesome library you've created. I want to add country image flag and country code as fetched from api and add custom adapter in the material spinner and show it when item selected. I have successfully created the custom adapter showing bottom dialog with image flag and code but when I'm selecting one item its only text that showing in Materialspinner. please help.

I was trying to find a solution to this, but I don't know how you would properly inflate a view inside a TextInputLayout (or TextInputEditText); remember, the MaterialSpinner view extends TextInputLayout.

A possible solution would be to revert to using a Spinner, but for me, that would defeat the purpose of using this library (since I usually rely on the concept of Live Validation with TextInputLayouts to show required fields in a form-like fragment).

AlfredAbdo avatar Mar 23 '21 05:03 AlfredAbdo

Any updates on this? I'm with the same problem

sebasira avatar May 13 '21 02:05 sebasira

Any updates on this? I'm with the same problem

No, you need to change this lib for result. So, in my project (beta-version) I place ImageView before spinner in horizontal linear layout and when I select some spinner item, I show target image. And in other place of app I use AppCompatAutoCompleteTextView with custom adapter, wich showing image in popuped row.

LunevNF avatar May 13 '21 02:05 LunevNF