android - 移除 Actionbar 和 Tab 之间的阴影

标签 android android-actionbar android-tabs android-actionbar-compat

我的应用程序使用的是我使用 Android Action Bar Style Generator 制作的自己的样式(样式兼容性 = AppCombat)。 Actionbar 和选项卡的颜色相同,但问题是它们之间有阴影。我怎样才能去除这个阴影?

<style name="MyAppTheme" parent="android:Theme.Holo.Light">
<item name="android:windowContentOverlay">@null</item>

“android:windowContentOverlay”正在移除选项卡下方而非上方的阴影。 enter image description here

最佳答案

好的,这是 solution通过 Audren Teissier这对我有用:

It's because you are using a drawable instead of a color.look for something like this:

<style name="MyActionBar"
parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/yourcolor</item>
</style>

Replace the drawable by a color like above and it should go away.

关于android - 移除 Actionbar 和 Tab 之间的阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25352597/

相关文章:

android - 如何在 ActionMode 中禁用操作栏后退按钮

android - Tab 过渡图标,如 Tinder

android - 如何在 Android 的 TabLayout 中以编程方式添加选项卡

android - 在 Android Studio 中单击 ListFragment 中的项目时显示详细信息 fragment

Android - ListView 中的自定义图标

android - android中的ActionBar和滑出菜单

android - 在 Android 的 Fragment 中添加选项卡?

android - 我如何将图像从 Mipmap 移动到 Drawables 并在 Android 中保持它们的大小?

java - 如何为布局、 ImageView 的背景设置动态壁纸或...这可能吗?

Android 选项卡内容以获得更好的用户体验