Skip to content

Instantly share code, notes, and snippets.

@aemxn
Created January 11, 2014 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aemxn/8374119 to your computer and use it in GitHub Desktop.
Save aemxn/8374119 to your computer and use it in GitHub Desktop.
protected void onCreate(Bundle savedInstanceState) {
...
// get listview
ListView lv = getListView();
lv.setDivider(null);
lv.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View view,
int position, long arg3) {
Toast.makeText(CategoryActivity.this, "Item selected: " + position,
Toast.LENGTH_LONG).show();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment