Remove duplicate shadows and some duplicate code

This commit is contained in:
2016-10-09 11:32:50 -04:00
parent b3aa3d14c0
commit 84a02fe541
2 changed files with 5 additions and 15 deletions

View File

@@ -81,8 +81,12 @@ public abstract class BaseRootView extends FrameLayout
if (SDK_INT >= LOLLIPOP)
{
getToolbar().setElevation(InterfaceUtils.dpToPixels(context, 2));
View view = findViewById(R.id.toolbarShadow);
if (view != null) view.setVisibility(View.GONE);
if (view != null) view.setVisibility(GONE);
view = findViewById(R.id.headerShadow);
if(view != null) view.setVisibility(GONE);
}
}
}

View File

@@ -138,7 +138,6 @@ public class BaseScreen
int color = rootView.getToolbarColor();
setActionBarColor(actionBar, color);
setStatusBarColor(color);
setupToolbarElevation(toolbar);
});
}
@@ -264,19 +263,6 @@ public class BaseScreen
activity.getWindow().setStatusBarColor(darkerColor);
}
private void setupToolbarElevation(Toolbar toolbar)
{
if (SDK_INT < LOLLIPOP) return;
toolbar.setElevation(InterfaceUtils.dpToPixels(activity, 2));
View view = activity.findViewById(R.id.toolbarShadow);
if (view != null) view.setVisibility(View.GONE);
// view = activity.findViewById(R.id.headerShadow);
// if (view != null) view.setVisibility(View.GONE);
}
private class ActionModeWrapper implements ActionMode.Callback
{
@Override