I’m trying to decide between simple_spinner_item and the simple_spinner_dropdown_item for my UI… so i put both on the screen to try them out back to back.
while i prefer the expanded style of the …dropdown_item, it’s unexpanded size is larger than the …spinner_item, and i’m not sure why, since there is no difference in the xml definitions… simply the implementation of different views via Java,
eg
ArrayAdapter<String> adapter1 = new ArrayAdapter(this, android.R.layout.simple_spinner_dropdown_item, arrayOfSomeStrings); //set the adapter to
spinner1
vs
ArrayAdapter<String adapter2> = new ArrayAdapter(this,android.R.layout.simple_spinner_item, arrayOfSomeMoreStrings); //set the adapter to spinner2
it seems to me that simple_spinner_dropdown_item must have a different prefferedHeight/size or something… is this true? and how can I override this and make the two spinners look identical on the UI until expanded?
Well I’m doing some research in this field as well. I think, you should only use .simple_spinner_item with your Adapter definition (ie. your spinner2 code above).
And to implement a drop down on that spinner just do like this: