Spinner Android link to XML items file -


i want create spinner in first app, don't know how link item list xml file. please me!

update

my code :

<spinner android:width="wrap-content" android:height="wrap-content" /> 

1: create xml file in witch have drag , drop spinner in xml layout.

2: access main xml layout in java in oncreate method

setcontentview(r.layout.main); 

3: create instance of spinner in java class. example

spinner spinner = (spinner) findviewbyid(r.id.spinner); 

* r.layout.main xml layout have created spinner.

here spninner

 <spinner   android:id="@+id/spinner"   android:layout_width="fill_parent"   android:layout_height="wrap_content"   android:prompt="@string/spinner_title"/> 

and here example if have problem spinner tutorial


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -