From d3ac7187bb4dc4802ef4de97b5646f9efa7e6579 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Wed, 9 Mar 2016 22:54:48 -0500 Subject: [PATCH] Roll back support library until fragment backgrounds are fixed --- app/build.gradle | 15 +--- .../lightning/activity/BrowserActivity.java | 83 ++++++++++--------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 82aa509..217d515 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -69,17 +69,10 @@ dexcount { dependencies { // support libraries - compile 'com.android.support:palette-v7:23.2.0' - compile('com.android.support:appcompat-v7:23.2.0') { - exclude group: 'com.android.support', module: 'support-v4' - } - compile('com.android.support:design:23.2.0') { - exclude group: 'com.android.support', module: 'support-v4' - } - compile('com.android.support:recyclerview-v7:23.2.0') { - exclude group: 'com.android.support', module: 'support-v4' - } - // Temp downgrade until google fixes the support lib + compile 'com.android.support:palette-v7:23.1.1' + compile 'com.android.support:appcompat-v7:23.1.1' + compile 'com.android.support:design:23.1.1' + compile 'com.android.support:recyclerview-v7:23.1.1' compile 'com.android.support:support-v4:23.1.1' // html parsing fo reading mode diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java index 8106de7..d00e506 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java @@ -278,27 +278,28 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); - mDrawerLayout.addDrawerListener(new DrawerListener() { - @Override - public void onDrawerSlide(View drawerView, float slideOffset) {} - - @Override - public void onDrawerOpened(View drawerView) {} - - @Override - public void onDrawerClosed(View drawerView) {} - - @Override - public void onDrawerStateChanged(int newState) { - if (newState == DrawerLayout.STATE_DRAGGING) { - mDrawerLeft.setLayerType(View.LAYER_TYPE_HARDWARE, null); - mDrawerRight.setLayerType(View.LAYER_TYPE_HARDWARE, null); - } else if (newState == DrawerLayout.STATE_IDLE) { - mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); - mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); - } - } - }); + //TODO restore when upgrading support library +// mDrawerLayout.addDrawerListener(new DrawerListener() { +// @Override +// public void onDrawerSlide(View drawerView, float slideOffset) {} +// +// @Override +// public void onDrawerOpened(View drawerView) {} +// +// @Override +// public void onDrawerClosed(View drawerView) {} +// +// @Override +// public void onDrawerStateChanged(int newState) { +// if (newState == DrawerLayout.STATE_DRAGGING) { +// mDrawerLeft.setLayerType(View.LAYER_TYPE_HARDWARE, null); +// mDrawerRight.setLayerType(View.LAYER_TYPE_HARDWARE, null); +// } else if (newState == DrawerLayout.STATE_IDLE) { +// mDrawerLeft.setLayerType(View.LAYER_TYPE_NONE, null); +// mDrawerRight.setLayerType(View.LAYER_TYPE_NONE, null); +// } +// } +// }); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mShowTabsInDrawer) { getWindow().setStatusBarColor(Color.BLACK); @@ -1408,24 +1409,30 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements } } mDrawerLayout.closeDrawers(); - mDrawerLayout.addDrawerListener(new DrawerListener() { - @Override - public void onDrawerSlide(View drawerView, float slideOffset) {} - - @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) {} - }); + // TODO restore after updating to latest support lib + // delete this code after restoring + if (runnable != null) { + runnable.run(); + } +// mDrawerLayout.addDrawerListener(new DrawerListener() { +// @Override +// public void onDrawerSlide(View drawerView, float slideOffset) {} +// +// @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