Remove the shadow below TabLayout on android

后端 未结 4 850
栀梦
栀梦 2021-02-19 11:21

I\'m trying to remove the shadow below tabs while using TabLayout, which is defined in a normal layout (and not as a part of a toolbar or actionbar).

Setting theme as

4条回答
  •  灰色年华
    2021-02-19 11:43

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

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    
        getSupportActionBar().setElevation(0);
    

提交回复
热议问题