The question says it all. I know how to implement a drawer with the drawerlayout, but i have no idea how to place a button next to the drawer (to show the drawer) that moves along with the drawer.
Asked
Active
Viewed 48 times
2 Answers
0
You have to use ActionBarDrawerToggle
.
ActionBarDrawerToggle myDrawerToggle = new ActionBarDrawerToggle(this, myDrawerLayout, R.drawable.my_icon_for_drawer_toggle,
R.string.drawer_open, R.string.drawer_close) {
@Override
public void onDrawerClosed(View drawerView) {
invalidateOptionsMenu();
}
@Override
public void onDrawerOpened(View drawerView) {
invalidateOptionsMenu();
}
};
myDrawerLayout.setDrawerListener(myDrawerToggle);

Giorgio Antonioli
- 15,771
- 10
- 45
- 70
0
I think what you want is sliding menu. Look at this Github project which also provides example code for it
https://github.com/jfeinstein10/SlidingMenu
Hope this helped!

Harin
- 2,413
- 3
- 15
- 30