Hi i would like to remove the elevation and shadow effect from my toolbar for API 21 and greater. Below is what i have tried
setSupportActionBar(mToolbar);
Use app:elevation="0dp" in your AppBarLayout. Make sure you put Toolbar inside your AppBarLayout like this -
app:elevation="0dp"
and add this line to your activity - findViewById(R.id.appBarLayout).bringToFront(); This will bring the AppBar to front.
findViewById(R.id.appBarLayout).bringToFront();