How to make Spinner Editable in Android?
Posted
by
Dhrumil Shah
on Stack Overflow
See other posts from Stack Overflow
or by Dhrumil Shah
Published on 2010-09-04T08:31:42Z
Indexed on
2010/12/29
9:53 UTC
Read the original article
Hit count: 589
I changed the ArrayAdapter method of spinner and i got my custom Spinner. just change the parameter of this method like
Spinner spinner = (Spinner) findViewById(R.id.Spinner01);
ArrayAdapter<CharSequence> adapter=ArrayAdapter.createFromResource(This,R.array.statename,R.layout.mylayout);
spinner.setAdapter(adp);
In Which the mylayout file contains
<EditText
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/spinnerTarget"
android:textColor="#FF8B1500"
android:gravity="center"
>
© Stack Overflow or respective owner