I read this question, making me understand why I must override getDropDownView
and getView
within my SpinnerAdapter
class:
SpinnerActionAdapter extends ArrayAdapter<String> implements SpinnerAdapter
The problem is I have the exact same code both in the getDropDownView
and getView
, which I do not think is a very beautiful solution.
Does everyone who uses SpinnerAdapter
have this code duplicated as well? Does anyone have a better solution?
Note: My code is working perfectly so there is no need to post it; it just looks strange because I have a lot of duplicated code.