Issue
I had used navigation slider menu code from here -> Android Sliding Menu using Navigation Drawer But when ever i click on sliding menu navigation icon that goes little inside and change the position. I need is that it be constant there should be no movement on Click it on the time the navigation list is open.
Solution
The ActionBarDrawerToggle
is what causes that behavior. It does this in methods it implements as a DrawerLayout.DrawerListener
, which we can override, and not call up to the super
methods.
For the ActionBarDrawerToggle
class found in the support-v4
library, we need only override one method:
mDrawerToggle = new ActionBarDrawerToggle(...) {
...
@Override
public void onDrawerSlide(View drawerView, float slideOffset) {
// Do not call super.onDrawerSlide(drawerView, slideOffset);
...
}
};
With the class from appcompat-v7
, we need to override two additional methods:
mDrawerToggle = new ActionBarDrawerToggle(...) {
...
@Override
public void onDrawerSlide(View drawerView, float slideOffset){
// Do not call super.onDrawerSlide(drawerView, slideOffset);
...
}
@Override
public void onDrawerClosed(View drawerView) {
// Do not call super.onDrawerClosed(drawerView);
...
}
@Override
public void onDrawerOpened(View drawerView) {
// Do not call super.onDrawerOpened(drawerView);
...
}
};
Answered By - Mike M.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.