Problem in Activity with Spinner and ListView
My activity has a spinner and a custom ListView and they are both sourced by custom ArrayAdapters (ArrayList of custom objects). The ListView rows are custom views (just 2 TextV开发者_C百科iews).
When I include the line, spinner.setAdapter(spinnerArrayAdapter); the ListView is NOT filled with data on the screen and the spinner contains the values I want.
When I remove the line, spinner.setAdapter(spinnerArrayAdapter); the ListView is filled with the data I want and the spinner does NOT contain any values.
When I debug, I see the data in the ListView's custom ArrayAdapter variable and the spinner's custom ArrayAdapter.
I have checked my getView() implementation for the ListView's custom ArrayAdapter class.
Suggestions?
Thanks in advance!
Can you paste some code to help identify the problem. I tested with two listviews and a spinner pointing to the same adapter. It worked fine for me.
精彩评论