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

Support for more than Strings #31

Open
cfoket opened this issue Jul 19, 2019 · 5 comments
Open

Support for more than Strings #31

cfoket opened this issue Jul 19, 2019 · 5 comments

Comments

@cfoket
Copy link

cfoket commented Jul 19, 2019

Would it be possible to adapt the SpinnerDialog to support a list of Objects, rather than Strings? More specifically, I would like to see the type of the item parameter in public void onClick(String item, int position) be changed to Object.

I think PR #24 would be a good starting point. The first argument of onSpinerItemClick.onClick(...) could then just be listView.getItemAtPosition(i).

The reason I am asking is because currently I have to resort to using two lists; one for the items I actually want to display, and a second one that contains their 'labels' (i.e. Strings), which I use when creating the spinner dialog. Then, I use the position I receive from the onClick(String item,int position) callback to determine which object (from the first list) was actually selected. However, this does not seem to work when the results of the spinner dialog are filtered. In that case I get the position in the filtered list, rather than the position in the unfiltered list, which is what I need. I think it would be much easier if the callback just returned the object that was selected.

@MdFarhanRaja
Copy link
Owner

MdFarhanRaja commented Jul 19, 2019 via email

@cfoket
Copy link
Author

cfoket commented Aug 21, 2019

Any updates on this yet? Thank you.

@ALI-SAMPSON
Copy link

Any update on the library yet

@vamfixed
Copy link

Updates please?

@MdFarhanRaja
Copy link
Owner

MdFarhanRaja commented Mar 19, 2020 via email

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

No branches or pull requests

4 participants