Android: Deleting Shadow Of Default ActionBar
Is there a way to remove the shadow from the default ActionBar? I only find solutions for custom ActionBars with 'noActionBar' as default layout.
Solution 1:
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getSupportActionBar().setElevation(0);
note : Go to the activity you want to remove the ActionBar's Elevation. Before setContent(....), request the ActionBar feature(That is if you have not declared it directly)
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
{
toolbar.setElevation(0.0f);
}
Post a Comment for "Android: Deleting Shadow Of Default ActionBar"