Example usage for android.widget Gallery getAdapter

List of usage examples for android.widget Gallery getAdapter

Introduction

In this page you can find the example usage for android.widget Gallery getAdapter.

Prototype

@Override
    public SpinnerAdapter getAdapter() 

Source Link

Usage

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;
    }
}