I tried this
getActionBar().setElevation(0);
getSupportActionBar().setElevation(0);
None seems to work.
Only worked when I put
app:elevation="0dp"
in the app_bar_main.xml
But I want to hide the shadow from only for UserProfile fragment.
Is there any way to do it programmatically?
I'm using import android.support.v7.app.AppCompatActivity so few functions I found on other posts are not working.