android - How have Control on onCreateActionMode -
i have recyclerview
in application. set context menu recyclerview
. menu display user when on long click action on recyclerview
items.
// multi select items in recyclerview private android.support.v7.view.actionmode.callback mdeletemode = new modalmultiselectorcallback(mmultiselector) { @override public boolean oncreateactionmode(android.support.v7.view.actionmode actionmode, menu menu) { getmenuinflater().inflate(r.menu.menu_add_reminder, menu); return true; } @override public boolean onactionitemclicked(android.support.v7.view.actionmode actionmode, menuitem menuitem) { switch (menuitem.getitemid()) { // on clicking discard reminders case r.id.discard_reminder: // close context menu actionmode.finish(); return true; // on clicking save reminders case r.id.save_reminder: // close context menu actionmode.finish(); ..... return true; case android.r.id.home: // close context menu actionmode.finish(); return true; default: break; } return false; } };
in menu have white arrow in left side of menu below(it's hard see because of white background):
first, tried remove arrow codes:
getsupportactionbar().setdisplayhomeasupenabled(false);
then tried have control on behavior this:
case android.r.id.home:
but didn't work me. thank help.
Comments
Post a Comment