1
I’m developing an app, which contains a menu drawer
, but I have a multitoque
, that is, when the user selects an item, and quickly selects again, it keeps the drawer aberto
.
I would like, that when the user selects an item, the drawer
close, and ignore the second click.
the event I’m dealing with today is like this
exp_list_fragments.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
if (groupPosition == 3 && childPosition > 0) {
switch (childPosition) {
case 1:
logoutApplication(false);
break;
case 2:
DialogSendEmail d = new DialogSendEmail(Activity_Main.this);
d.show();
break;
case 3:
rt.questionExitSystem();
break;
}
} else {
Child_Fragments child_fragment = group_fragments.get(groupPosition).getFragments().get(childPosition);
controller.setActionBarTitle(child_fragment.getTitle(), child_fragment.getIcone());
supportInvalidateOptionsMenu();
getSupportFragmentManager().beginTransaction().replace(R.id.layout_drawer_content,
child_fragment.getFragment()).commit();
}
setFragmentSelection(groupPosition, childPosition);
layout_drawer.closeDrawer(layout_drawer_drawer);
return false;
}
});
}