FileDocCategorySizeDatePackage
SamplesList.javaAPI DocAndroid 5.1 API2022Thu Mar 12 22:22:48 GMT 2015com.android.rastermill.samples

SamplesList

public class SamplesList extends android.app.ListActivity

Fields Summary
static final String
KEY_NAME
static final String
KEY_CLASS
static final ArrayList
SAMPLES
Constructors Summary
Methods Summary
static java.util.MapmakeSample(java.lang.String name, java.lang.Class activity)


          
        Map<String,Object> ret = new HashMap<String,Object>();
        ret.put(KEY_NAME, name);
        ret.put(KEY_CLASS, activity);
        return ret;
    
protected voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);
        setListAdapter(new SimpleAdapter(this, SAMPLES,
                android.R.layout.simple_list_item_1, new String[] { KEY_NAME },
                new int[] { android.R.id.text1 }));
    
protected voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        Class<?> clazz = (Class<?>) SAMPLES.get(position).get(KEY_CLASS);
        startActivity(new Intent(this, clazz));