Android: I cannot remove elevation / shadow on my toolbar

前端 未结 10 2311
名媛妹妹
名媛妹妹 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条回答
  •  星月不相逢
    2020-12-08 02:52

    Create another style for v21 and add

    @dimen/toolbar_elevation to that style. On normal style don't use elevation and don't use it in xml, just use style="@style/yourCustomToolbarStyle"

提交回复
热议问题