Remove the shadow below TabLayout on android

允我心安 提交于 2019-12-04 01:21:42
Steve McMeen

I'm assuming your TabLayout is inside AppBarLayout, that shadow comes with AppBarLayout, add this app:elevation="0dp" to that widget and I believe you're good to go.

shiguiyou

I try app:elevation="0dp" work and android:elevation="0dp" does not work in AppBarLayout

Sarath SVS

I had to set the elevation to 0dp and I also change the theme of AppBarLayout to @style/Base.Widget.Design.TabLayout and it worked for me

Ante Krištić

Put getSupportActionBar().setElevation(0); in MainActivity java file like this:

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getSupportActionBar().setElevation(0);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!