Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable CollapsingToolbarLayout elevation

I'm using code from this answer. And I'm trying to disable the elevation of the toolbar when collapsed. I tried putting android:elevation="0dp" to all xml tags but it just didn't work out. Any suggestion?

enter image description here

like image 634
Hendra Anggrian Avatar asked Dec 28 '15 13:12

Hendra Anggrian


2 Answers

Setting app:elevation="0dp" on AppBarLayout does the job.

like image 162
Hendra Anggrian Avatar answered Sep 21 '22 15:09

Hendra Anggrian


Just add

android:stateListAnimator="@null"

to your AppBarLayout

like image 42
Vladislav Shcherbakov Avatar answered Sep 20 '22 15:09

Vladislav Shcherbakov