Open RbkGh opened 8 years ago
@rey5137 ,have you examined this yet?
Hi @RbkGh, I experienced this same problem when trying to create a custom spinner adapter. Considering the lack of response to your post, I went a different route. Instead of using a custom adapter, I just used the alternative ArrayAdapter constructor that allows passing in both the layout and text field ID. This achieved the same goal for me.
That's good to know,but I reverted to a different library which handled that perfectly for me.Thanks anyway.
Hi @RbkGh, fortunately, the constructor I mentioned applies to the standard Spinner as well. I've just been testing this library myself and I'm not planning on using it going forward either since this one seems to no longer be supported. I'm curious, which library did you go with?
It's been a while,just dug through that codebase and this is what i used in the build.gradle file com.github.navasmdc:MaterialDesign:1.5@aar .If my memory serves me right,it requires nineoldandroids as a dependency.You can check it out.
Thanks @RbkGh, I appreciate the help!
My pleasure
I have extended BaseAdapter and set adapter to the spinner. The data shows as set on the Spinner successfully but when clicked on,the dropdown of the list of data does not work.It just plays the ripple animation on the spinner but nothing happens. I simulated the same thing with the default android spinner(android.widget.Spinner) and it works but when the same custom adapter is set to com.rey.material.widget.spinner,nothing happens,although the data is visibly shown on the spinner.I even tried the example application style by annotating my oncreateView to target HoneyComb. @rey5137 ,Kindly help me find what I am doing wrong.Thanks in advance.
AccountGroupsSpinnerItem acc = new AccountGroupsSpinnerItem("hello","2"); AccountGroupsSpinnerItem acc2 = new AccountGroupsSpinnerItem("Family","46"); List accountGroupsSpinnerItemList = new ArrayList<>();
accountGroupsSpinnerItemList.add(acc);
accountGroupsSpinnerItemList.add(acc2);
AllGroupsSpinnerAdapter allGroupsSpinnerAdapter = new AllGroupsSpinnerAdapter(getActivity(),accountGroupsSpinnerItemList);
groupsSpinner.setAdapter(allGroupsSpinnerAdapter);
spinner_groups_all_row.txt
AccountGroupsSpinnerItem.txt AllGroupsSpinnerAdapter.txt