Skip to content

Instantly share code, notes, and snippets.

Last active April 12, 2017 11:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jezinka/9ba6d78861ea750303b18f1beac02a07 to your computer and use it in GitHub Desktop.
expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
public boolean onChildClick(ExpandableListView parent, final View v, final int groupPosition, final int childPosition, final long id) {
AlertDialog.Builder childContextMenuBuilder = new AlertDialog.Builder(v.getContext());
childContextMenuBuilder.setItems(R.array.dinner_child_actions, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Date date = dinnerAdapter.getGroup(groupPosition);
switch (which) {
case 0:
AlertDialog.Builder addBuilder = addNewDinnerBuilder(v, date);;
case 1:
dinnerContract.deleteDinner(id, dbHelper);
case 2:
Dinner dinner = dinnerAdapter.getChild(groupPosition, childPosition);
AlertDialog.Builder editBuilder = addNewDinnerBuilder(v, date, dinner);;
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment