android - 使用填充时 Actionbar-compat 下方的阴影

标签 android android-layout android-actionbar

我正在开发一个 Android 应用程序,该应用程序使用 Google 的兼容包来获取 Android 2.x 中的 fragment 等。操作栏是根据 Google 的示例创建的。使用

在其下方放置了一个白色“阴影”
<item name="android:windowContentOverlay">@drawable/actionbar_shadow</item>

但是操作栏下方的对象( fragment )包含具有以下属性的 ListView

android:paddingTop="5dp"

这导致白色阴影也下降了 5dp:

enter image description here

有没有办法在将阴影保持在适当位置的同时保持 ListView 上的填充?

最佳答案

此项应该在应用程序主题中而不是 ActionBar 样式中。

关于android - 使用填充时 Actionbar-compat 下方的阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11665651/

相关文章:

Android fragment 布局问题(垂直和水平居中按钮)

Android float 操作按钮选项菜单

android - 选项卡切换时的流畅动画

android - fragment 交易、操作栏和后台堆栈

Android Studio - 只是无法让操作栏/溢出工作?

java - Android proguard 与 volley : ClassNotFoundException: Didn't find class "com.android.volley.VolleyLog"

android - 当 edittext 的默认文本为浮点值时,编辑文本光标重置为左侧

Android Wear 应用程序未通过手机安装

Android sleep() 不阻塞 UI

Android 小部件大小调整 : Is the height of a single cell 80dp or 40dp?