Questions tagged [actionbardrawertoggle]

60 questions
16
votes
6 answers

Changing Navigation drawer hamburger icon

I am trying to change hamburger menu icon for NavigationView but I am unable to do so. Here is what I have tried so far I have a base activity where nav drawer setup is done. Here is relevant piece of code @Override protected void onCreate(Bundle…
12
votes
4 answers

Change ActionBarDrawerToggle icon android in toolbar?

I have an activity with navigation drawer and toolbar Activity public class MainActivity extends AppCompatActivity { private Toolbar toolbar; private CustomTextViewMondaRegular tvTitle; private ListView mDrawerList; private DrawerLayout…
WISHY
  • 11,067
  • 25
  • 105
  • 197
9
votes
4 answers

How can we change ActionBarDrawerToggle icon?

I'm new with Android and in my app, I am using DrawerLayout, it's ok and fine. But I want to change ActionBarDrawerToggle icon. How can we change it? I tried a lot but I could not able to achieve the desired result, please help me…
Krish
  • 4,166
  • 11
  • 58
  • 110
9
votes
1 answer

Deprecated ActionBarDrawerToggle

I was trying to implement the android.support.v4.app.ActionBarDrawerToggle in my app; since this class is deprecated This class is deprecated. Please use ActionBarDrawerToggle in support-v7-appcompat. I've switched to…
Cris
  • 2,002
  • 4
  • 30
  • 51
6
votes
1 answer

When does "ActionBarDrawerToggle" show its "openDrawerContentDescRes" and "closeDrawerContentDescRes" strings?

Background The CTOR of "ActionBarDrawerToggle" is as such: public ActionBarDrawerToggle (Activity activity, DrawerLayout drawerLayout, int openDrawerContentDescRes, int closeDrawerContentDescRes) or: public ActionBarDrawerToggle (Activity activity,…
3
votes
1 answer

onOptionsItemSelected not called pressing up navigation icon on fragment

Title is almost self explanatory. Architecture: I have Main activity that extends AppCompatActivity. Also I have a drawer layout. Each option of this menu opens a fragment. Each fragment has its own menu layout by setHasOptionsMenu(true) with its…
3
votes
1 answer

How can I change the actionbardrawertoggle icon, android?

In my activity I want to change the drawer toggle icon I have my toolbar
WISHY
  • 11,067
  • 25
  • 105
  • 197
2
votes
1 answer

onOptionsItemSelected not called in activity

Here's my problem. The onOptionsItemSelected() not called on drawer click. So here's my code, that's very simple... public class MainActivity extends AppCompatActivity { private Toolbar toolbar; private DrawerLayout drawer; private…
2
votes
0 answers

ActionBarDrawerToggle disappears when addToBackStack(null) is used

In the selectItem() method, adding .addToBackStack(null) to my transaction seems to break the toggle button (the one that brings out the nav drawer when tapped). It just disappears entirely when a fragment is loaded (by clicking on the corresponding…
misaochan
  • 890
  • 2
  • 8
  • 25
2
votes
0 answers

Android overrride onclick of Toggle Button Navigation Drawer

I want to change the toggle view of mDrawerToggle to Arrow from Burger icon and locking the sliding listview as well. When this arrow is clicked, I want to launch an activity instead of the listview. Code: drawer.closeDrawer(drawerListView); …
Abhishek Dey
  • 1,601
  • 1
  • 15
  • 38
2
votes
1 answer

Android 5.1, ActionBarDrawerToggle not showing the arrow, worked with 5.0 with no code changes

I use the Toolbar as the action bar, DrawerLayout and ActionBardrawerToggle. My min and target SDK is 21. At this point, everything was working fine while my device was running 5.0.1 (API 21). The other day, I got my 5.1 update and the drawer toggle…
wujek
  • 10,112
  • 12
  • 52
  • 88
2
votes
0 answers

ActionBarDrawerToggle's openDrawerContentDescRes and closeDrawerContentDescRes

The ActionBarDrawerToggle doesn't seem to use the openDrawerContentDescRes and closeDrawerContentDescRes arguments. Here's my example code: actionBarDrawerToggle = new ActionBarDrawerToggle( this, // Activity drawerLayout, …
1
vote
2 answers

Android Change Hamburger icon position based on ToolBar size

I am trying to set the position of Hamburger icon in ToolBar as Vertically Center, but unable to do so. I made ToolBar height based on layout weight. I cannot use ToolBar default height because of customer requirement. Below is my Main Activity…
Robin Purbia
  • 227
  • 2
  • 17
1
vote
1 answer

ActionBarDrawerToggle won't appear in fragment

I implemented this as the default fragment when the navigation drawer fires up and it works, but the ActionBarDrawerToggle won't appear. Main Activity: public class MainActivity extends AppCompatActivity implements…
xaldin
  • 23
  • 1
  • 5
1
vote
2 answers

ActionBarDrawerToggle with AppCompatActivity and Toolbar Back button with Fragments

I am using the ActionBarDrawerToggle with NavigationView. My content is displayed using fragments. I am following this stackoverflow question to get the back button press to work but control never flows to onOptionsItemSelected. This is my…
1
2 3 4