List of usage examples for android.widget Gallery getAdapter
@Override
public SpinnerAdapter getAdapter()
From source file:net.evendanan.android.hagarfingerpainting.HagarFingerpaintingActivity.java
@Override protected void onPrepareDialog(int id, Dialog dialog) { switch (id) { case DIALOG_NEW_PAPER: EditText painterName = (EditText) dialog.findViewById(R.id.painter_name_input_text); painterName.setText(getPainterName()); //recreating the items (so they lose their inner state) final Gallery colors = (Gallery) dialog.findViewById(R.id.colors_list); ((PaperColorListAdapter) colors.getAdapter()).clearItemsState(); break;// ww w . j a v a 2 s .co m default: super.onPrepareDialog(id, dialog); break; } }