Hendra Anggrian
Hendra Anggrian

Reputation: 5858

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

Upvotes: 8

Views: 5731

Answers (2)

Vladislav Shcherbakov
Vladislav Shcherbakov

Reputation: 796

Just add

android:stateListAnimator="@null"

to your AppBarLayout

Upvotes: 4

Hendra Anggrian
Hendra Anggrian

Reputation: 5858

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

Upvotes: 30

Related Questions