Android: I cannot remove elevation / shadow on my toolbar

前端 未结 10 2313
名媛妹妹
名媛妹妹 2020-12-08 01:57

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);
          


        
10条回答
  •  猫巷女王i
    2020-12-08 02:46

    Solution is simple. Just add following line into your AppBar layout. No need to add elevation for the Toolbar or AppBar layout after this.

    android:stateListAnimator="@null"
    

提交回复
热议问题