FileDocCategorySizeDatePackage
ListThrasher.javaAPI DocAndroid 1.5 API3673Wed May 06 22:42:02 BST 2009com.android.frameworktest.listview

ListThrasher

public class ListThrasher extends android.app.ListActivity implements AdapterView.OnItemSelectedListener
Exercises change notification in a list

Fields Summary
android.os.Handler
mHandler
ThrashListAdapter
mAdapter
Random
mRandomizer
android.widget.TextView
mText
Runnable
mThrash
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setContentView(R.layout.list_thrasher);

        mText = (TextView) findViewById(R.id.text);
        mAdapter = new ThrashListAdapter(this);
        setListAdapter(mAdapter);

        mHandler.postDelayed(mThrash, 5000);

        getListView().setOnItemSelectedListener(this);
    
public voidonItemSelected(android.widget.AdapterView parent, android.view.View v, int position, long id)

        mText.setText("Position " + position);
    
public voidonNothingSelected(android.widget.AdapterView parent)

        mText.setText("Nothing");