3

I want to change the default spinner drop down icon also want to change the background of it, by using which property I can do that?

I am having following spinner code:

<Spinner
    android:id="@+id/security_ques"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:drawSelectorOnTop="true"
    style="@style/spinner_style"
    android:prompt="@string/prompt" >
</Spinner>

please give any solution on it

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
asiya
  • 280
  • 1
  • 5
  • 16

2 Answers2

0

See this link for custom spinner drop down box.

They have created customized xml layout for spinner and called that layout to the spinner using these code

  Spinner mySpinner = (Spinner) findViewById(R.id.spinner_show);
  mySpinner.setAdapter(new MyAdapter(this, R.layout.custom_spinner, spinnerValues));
Karthick pop
  • 616
  • 3
  • 16
0

use it in your xml

android:background="@drawable/your_imagename"
gotqn
  • 42,737
  • 46
  • 157
  • 243
Avinash Kumar Pankaj
  • 1,700
  • 2
  • 18
  • 27