0

I am able to customize the spinner dropdown background by specifying the drawable resource in the Spinner XML element:

<Spinner 
 android:id="@+id/search_spinner" 
 android:layout_height="wrap_content" 
 android:layout_width="fill_parent"
 android:background="@drawable/spinner_dropdown">
</Spinner>

Once the spinner drop down is clicked the pop-up list with options appears. This I am able to customize as well by calling the adapter.setDropDownViewResource(R.layout.spinner_row_layout); where the spinner_row_layout is the layout for one line for the list. If I put here a TextView I have the custom row, but I miss the radio button on the right side. If I put there instead of the TextView the CheckedTextView I have custom background for the line, but the default check mark. The problem with the default checkmark is that its color do not fit the company color guidlines...

How can I define the custom check mark - ideally by using styles/themes for the whole application? I have tried many ways including this one, but nothing works. If anyone has the working example please share.

Community
  • 1
  • 1
STeN
  • 6,262
  • 22
  • 80
  • 125

1 Answers1

0

You will have to define the custom row layout for your spinner.

This row layout can have a TextView and the CheckBox. You can always further customize this.

I am have not tried this out myself yet. (I have to do this for a project ended up in your question) I found a good example here.

bluefalcon
  • 4,225
  • 1
  • 32
  • 41