FileDocCategorySizeDatePackage
TransparentListActivity.javaAPI DocAndroid 5.1 API6624Thu Mar 12 22:22:44 GMT 2015com.android.test.hwui

TransparentListActivity

public class TransparentListActivity extends android.app.Activity

Fields Summary
private static final String[]
DATA_LIST
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);
        
        getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.gradient));
        setContentView(R.layout.list_activity);

        ListAdapter adapter = new SimpleListAdapter(this);

        ListView list = (ListView) findViewById(R.id.list);
        list.setAdapter(adapter);
        list.setCacheColorHint(0);
        list.setVerticalFadingEdgeEnabled(true);

        registerForContextMenu(list);
    
public voidonCreateContextMenu(android.view.ContextMenu menu, android.view.View v, ContextMenu.ContextMenuInfo menuInfo)

        super.onCreateContextMenu(menu, v, menuInfo);
        menu.setHeaderTitle("Context menu");
        menu.add("List item 1");
        menu.add("List item 2");
        menu.add("List item 3");