Is there a way to remove the shadow from the default ActionBar? I only find solutions for custom ActionBars with "noActionBar" as default layout.
Asked
Active
Viewed 163 times
1 Answers
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);
}

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343

Sai Jayant
- 366
- 2
- 14