Update to latest support libs, get rid of pointless hardware layers
This commit is contained in:
parent
8132b34bbf
commit
a6edd3ca29
@ -57,10 +57,10 @@ dexcount {
|
||||
|
||||
dependencies {
|
||||
// support libraries
|
||||
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:palette-v7:23.2.0'
|
||||
compile 'com.android.support:appcompat-v7:23.2.0'
|
||||
compile 'com.android.support:design:23.2.0'
|
||||
compile 'com.android.support:recyclerview-v7:23.2.0'
|
||||
|
||||
// html parsing fo reading mode
|
||||
compile 'org.jsoup:jsoup:1.8.3'
|
||||
|
@ -276,8 +276,30 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
mBackground.setColor(((ColorDrawable) mToolbarLayout.getBackground()).getColor());
|
||||
|
||||
// Drawer stutters otherwise
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mShowTabsInDrawer) {
|
||||
getWindow().setStatusBarColor(Color.BLACK);
|
||||
@ -329,8 +351,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
|
||||
mArrowImage = (ImageView) customView.findViewById(R.id.arrow);
|
||||
FrameLayout arrowButton = (FrameLayout) customView.findViewById(R.id.arrow_button);
|
||||
if (mShowTabsInDrawer) {
|
||||
// Use hardware acceleration for the animation
|
||||
mArrowImage.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
if (mArrowImage.getWidth() <= 0) {
|
||||
mArrowImage.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ public class TabsFragment extends Fragment implements View.OnClickListener, View
|
||||
animator.setChangeDuration(0);
|
||||
animator.setRemoveDuration(200);
|
||||
animator.setMoveDuration(200);
|
||||
mRecyclerView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
mRecyclerView.setLayerType(View.LAYER_TYPE_NONE, null);
|
||||
mRecyclerView.setItemAnimator(animator);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
mTabsAdapter = new LightningViewAdapter(mShowInNavigationDrawer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user