FileDocCategorySizeDatePackage
ListFilter.javaAPI DocAndroid 5.1 API13837Thu Mar 12 22:22:12 GMT 2015android.widget.listview

ListFilter

public class ListFilter extends android.app.ListActivity implements android.view.View.OnClickListener
Tests hiding and showing the list filter by hiding and showing an ancestor of the ListView

Fields Summary
private android.view.View
mFrame
private android.widget.Button
mHide
private android.widget.Button
mShow
private String[]
mStrings
Constructors Summary
Methods Summary
public voidonClick(android.view.View v)

        mFrame.setVisibility(v == mHide ? View.INVISIBLE : View.VISIBLE);
    
public voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        setContentView(R.layout.list_filter);
        setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, mStrings));
        getListView().setTextFilterEnabled(true);
        mFrame = findViewById(R.id.frame);
        
        mHide = (Button) findViewById(R.id.hide);
        mHide.setOnClickListener(this);
        
        mShow = (Button) findViewById(R.id.show);
        mShow.setOnClickListener(this);