I created a spinner with a simple list of String []. Now I had to extend it by its own object, i.e. an ArrayList<ObjectType>. I created ArrayAdapter and everything works fine, except I lost the default style of my Spinner.
I have a ruler responsible for the style, but when expanded between items does not break, it is simply illegible.
s_status_adapter.setDropDownViewResource(
android.R.layout.simple_spinner_dropdown_item);
How do I get the Spinner to use the system style?
You can use android layout resources like this.
ArrayAdapter<String> adapter = new ArrayAdapter<>(context,android.R.layout.simple_spinner_item, items);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With