I use Spinner in Dialog Mode.
I set SimpleCursorAdapter for the Spinner with setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
That works fine.
Now instead of simple_spinner_dropdown_item I’m trying to pass my custom layout it does work well too.
But there is a but… it does not have radio button that original simple_spinner_dropdown_item does.
Is it possible to add radio button inside of my custom spinner_dropdown_item that would be selected when spinner dialog is shown?
Well I have found solution. ListView (what is inside of the spinners dialog) will check if your View is Checkable and call setChecked. Since android.R.layout.simple_spinner_dropdown_item is checkable it works.
So for my custom List item i have created LinearLayout that implements Checkable
So ListView calls setChecked and I propagate that down to children views and my CheckBox / RadioButton will get checked / unchecked correctly.