mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Remove duplicate shadows and some duplicate code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user