|
|
@ -278,27 +278,28 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
|
|
|
|
|
|
|
|
mDrawerLayout.addDrawerListener(new DrawerListener() { |
|
|
|
//TODO restore when upgrading support library
|
|
|
|
@Override |
|
|
|
// mDrawerLayout.addDrawerListener(new DrawerListener() {
|
|
|
|
public void onDrawerSlide(View drawerView, float slideOffset) {} |
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerSlide(View drawerView, float slideOffset) {}
|
|
|
|
@Override |
|
|
|
//
|
|
|
|
public void onDrawerOpened(View drawerView) {} |
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerOpened(View drawerView) {}
|
|
|
|
@Override |
|
|
|
//
|
|
|
|
public void onDrawerClosed(View drawerView) {} |
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerClosed(View drawerView) {}
|
|
|
|
@Override |
|
|
|
//
|
|
|
|
public void onDrawerStateChanged(int newState) { |
|
|
|
// @Override
|
|
|
|
if (newState == DrawerLayout.STATE_DRAGGING) { |
|
|
|
// public void onDrawerStateChanged(int newState) {
|
|
|
|
mDrawerLeft.setLayerType(View.LAYER_TYPE_HARDWARE, null); |
|
|
|
// if (newState == DrawerLayout.STATE_DRAGGING) {
|
|
|
|
mDrawerRight.setLayerType(View.LAYER_TYPE_HARDWARE, null); |
|
|
|
// mDrawerLeft.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
|
|
|
} else if (newState == DrawerLayout.STATE_IDLE) { |
|
|
|
// mDrawerRight.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
|
|
|
mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
// } else if (newState == DrawerLayout.STATE_IDLE) {
|
|
|
|
mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); |
|
|
|
// mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null);
|
|
|
|
} |
|
|
|
// mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mShowTabsInDrawer) { |
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mShowTabsInDrawer) { |
|
|
|
getWindow().setStatusBarColor(Color.BLACK); |
|
|
|
getWindow().setStatusBarColor(Color.BLACK); |
|
|
@ -1408,24 +1409,30 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
mDrawerLayout.closeDrawers(); |
|
|
|
mDrawerLayout.closeDrawers(); |
|
|
|
mDrawerLayout.addDrawerListener(new DrawerListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onDrawerSlide(View drawerView, float slideOffset) {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void onDrawerOpened(View drawerView) {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
// TODO restore after updating to latest support lib
|
|
|
|
public void onDrawerClosed(View drawerView) { |
|
|
|
// delete this code after restoring
|
|
|
|
if (runnable != null) { |
|
|
|
if (runnable != null) { |
|
|
|
runnable.run(); |
|
|
|
runnable.run(); |
|
|
|
} |
|
|
|
} |
|
|
|
mDrawerLayout.removeDrawerListener(this); |
|
|
|
// mDrawerLayout.addDrawerListener(new DrawerListener() {
|
|
|
|
} |
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerSlide(View drawerView, float slideOffset) {}
|
|
|
|
@Override |
|
|
|
//
|
|
|
|
public void onDrawerStateChanged(int newState) {} |
|
|
|
// @Override
|
|
|
|
}); |
|
|
|
// public void onDrawerOpened(View drawerView) {}
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerClosed(View drawerView) {
|
|
|
|
|
|
|
|
// if (runnable != null) {
|
|
|
|
|
|
|
|
// runnable.run();
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// mDrawerLayout.removeDrawerListener(this);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// @Override
|
|
|
|
|
|
|
|
// public void onDrawerStateChanged(int newState) {}
|
|
|
|
|
|
|
|
// });
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|