0

I want to remove the small navigation drawer icon and open the left panel on actionbar icon click. How can I do this?

Actually I'm creating an Actionbar like Pinterest's

juliano.net
  • 7,982
  • 13
  • 70
  • 164

1 Answers1

1

If you want to get rid of the DrawerLayout indicator don't use the ActionBarDrawerToggle. To toggle the DrawerLayout when you select the ActionBar home affordance call DrawerLayout.openDrawer and DrawerLayout.closeDrawer depending on the current state.

switch (item.getItemId()) {
        case android.R.id.home:
            if (mDrawerLayout.isDrawerVisible(GravityCompat.START)) {
                mDrawerLayout.closeDrawer(GravityCompat.START);
            } else {
                mDrawerLayout.openDrawer(GravityCompat.START);
            }
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }

Also, from what I can tell Pinterest doesn't use a DrawerLayout.

adneal
  • 30,484
  • 10
  • 122
  • 151
  • It's not that it uses navigation drawer, it's just kind of the same look and feel that I need. But your code already helped me. Thanks. – juliano.net Mar 17 '14 at 11:36