Panduan Praktis Pembuatan Aplikasi Android/Spinner
Di contoh berikut, variabel nama_array dan nama_prompt diatur pada berkas /res/values/strings.xml:
<Spinner android:id="@+id/spinner1" android:layout_width="wrap_parent" android:layout_height="wrap_content" [android:layout_weight="1"] [android:visibility="invisible"] android:entries="@array/nama_array" [android:prompt="@string/nama_prompt"] />
Pranala luar
sunting- (en) Android Spinner : Avoid onItemSelected calls during initialization.
- (en) Android spinner (drop down list) example.
- (en) Spinners.
- (en) Spinner:How to know whether item selection was changed programmatically or by a user action through UI.
- (en) spinner inside an alertdialog.builder won't display any item.