drawertoggle

How to detect that the DrawerLayout started opening?

£可爱£侵袭症+ 提交于 2019-11-27 12:01:02
So I have tabs that I want to hide when the Navigation Drawer starts opening. The code I have hides them when it finished opening, but it's not what I want. mDrawerToggle = new ActionBarDrawerToggle( this, mDrawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close ) { @Override public void onDrawerClosed(View view) { invalidateOptionsMenu(); setActionBarMode(ActionBar.NAVIGATION_MODE_TABS); } @Override public void onDrawerOpened(View drawerView) { invalidateOptionsMenu(); setActionBarMode(ActionBar.NAVIGATION_MODE_STANDARD); } }; mDrawerLayout.setDrawerListener

How animate Burger to Arrow with Appcompat v7 21, Toolbar and DrawerLayout

折月煮酒 提交于 2019-11-27 11:34:22
I am using the android.support.v7.widget.Toolbar with a android.support.v4.widget.DrawerLayout. It works fine, the Burger icon is shown when the Navigation Drawer is closed, and the Arrow icon is shown when the Drawer is open. I want to disable the drawer and animate the Burger icon into Arrow on some event in the app. I have tried to set the lock mode to closed, but the v7.app.ActionBarDrawerToggle is still showing the Burger and it opens the Drawer. mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED); Any ideas? Thanks! Update: No I can change the state of the icon and I

How to detect that the DrawerLayout started opening?

三世轮回 提交于 2019-11-26 15:51:54
问题 So I have tabs that I want to hide when the Navigation Drawer starts opening. The code I have hides them when it finished opening, but it's not what I want. mDrawerToggle = new ActionBarDrawerToggle( this, mDrawerLayout, R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close ) { @Override public void onDrawerClosed(View view) { invalidateOptionsMenu(); setActionBarMode(ActionBar.NAVIGATION_MODE_TABS); } @Override public void onDrawerOpened(View drawerView) { invalidateOptionsMenu()

How animate Burger to Arrow with Appcompat v7 21, Toolbar and DrawerLayout

本秂侑毒 提交于 2019-11-26 15:37:46
问题 I am using the android.support.v7.widget.Toolbar with a android.support.v4.widget.DrawerLayout. It works fine, the Burger icon is shown when the Navigation Drawer is closed, and the Arrow icon is shown when the Drawer is open. I want to disable the drawer and animate the Burger icon into Arrow on some event in the app. I have tried to set the lock mode to closed, but the v7.app.ActionBarDrawerToggle is still showing the Burger and it opens the Drawer. mDrawerLayout.setDrawerLockMode

How to implement DrawerArrowToggle from Android appcompat v7 21 library

我们两清 提交于 2019-11-26 02:34:25
So now that Android 5.0 was released i was wondering how to implement the animated actionbar icons. This library here implements it fine for me but since the appcompat v7 library has it how can it be implemented? The library references it in themes.xml <item name="drawerArrowStyle">@style/Widget.AppCompat.DrawerArrowToggle</item> Under this style <style name="Base.V7.Theme.AppCompat" parent="Platform.AppCompat"> UPDATE I got this implemented using the v7 DrawerToggle. However I cannot style it. Please Help I found the styling for it in the v7 styles_base.xml <style name="Base.Widget.AppCompat

How to implement DrawerArrowToggle from Android appcompat v7 21 library

老子叫甜甜 提交于 2019-11-26 01:10:22
问题 So now that Android 5.0 was released i was wondering how to implement the animated actionbar icons. This library here implements it fine for me but since the appcompat v7 library has it how can it be implemented? The library references it in themes.xml <item name=\"drawerArrowStyle\">@style/Widget.AppCompat.DrawerArrowToggle</item> Under this style <style name=\"Base.V7.Theme.AppCompat\" parent=\"Platform.AppCompat\"> UPDATE I got this implemented using the v7 DrawerToggle. However I cannot