Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom adapter for Material spinner #31

Open
divya-navsoft opened this issue Jul 7, 2020 · 4 comments
Open

Custom adapter for Material spinner #31

divya-navsoft opened this issue Jul 7, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@divya-navsoft
Copy link

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.

@tiper tiper added the enhancement New feature or request label Jul 8, 2020
@LunevNF
Copy link

LunevNF commented Jan 22, 2021

ohhh, from 8 jul 2020... facepalm

@AlfredAbdo
Copy link

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).

@sebasira
Copy link

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

@LunevNF
Copy link

LunevNF commented May 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants