Remove Default Home/up Button In Action Mode
I have created custom action mode which visible on long click on list item . There is default back/up button visible in actionMode. Without change in style.xml , it's possible to
Solution 1:
Try this,
getActionBar().setDisplayHomeAsUpEnabled(false);
OR
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
this may helps you.
Solution 2:
Use the method: getActionBar().setDisplayHomeAsUpEnabled(false) to remove the home button from the action bar.
Example:
ActionBaractionBar= getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(false); // disable the button
actionBar.setDisplayHomeAsUpEnabled(false); // remove the left caret
actionBar.setDisplayShowHomeEnabled(false); // remove the icon
}
Solution 3:
You can remove action button home up enabled through ::
if you are using support v7 lib then
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
else
getActionBar().setDisplayHomeAsUpEnabled(false);
Post a Comment for "Remove Default Home/up Button In Action Mode"