克服SlidingTabLayout摆脱动作条的影子 [英] Get rid of ActionBar shadow over SlidingTabLayout

查看:229
本文介绍了克服SlidingTabLayout摆脱动作条的影子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我移植我应用appcompat21,使用SlidingTabLayout在一个ActionBarActivity标签。该行动条蒙上标签栏的影子,我无法弄清楚如何摆脱它:

I'm porting my app to appcompat21, using SlidingTabLayout for tabs in an ActionBarActivity. The Action bar is casting a shadow over the tab strip, and I can't figure out how to get rid of it:

下面是我有:

 <style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar">
     <item name="background">@color/app_primary</item>
     <item name="android:background">@color/app_primary</item>
     <item name="backgroundSplit">@color/black</item>
     <item name="android:backgroundSplit">@color/black</item>
     <item name="android:elevation">0dp</item>
 </style>

我也试过

     <item name="android:windowContentOverlay">@null</item>

我的影子的的通过设置其海拔在布局文件,但现在我有两个人影标签栏...
任何想法如何解决这一问题?

I got the shadow under the tab bar by setting its elevation in the layout file, but now I have two shadows... Any idea how to fix this?

推荐答案

由于某些原因,这并没有对以及工作:

For some reason, this did not work for as well:

<item name="android:elevation">0dp</item>

<item name="android:windowContentOverlay">@null</item>

我目前正在使用,为动作条

this.getSupportActionBar().setElevation(0);

这篇关于克服SlidingTabLayout摆脱动作条的影子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆