在Android应用中删除通知栏阴影

def*_*rex 13 java android android-ui

在android中,顶部的通知栏大部分时间都有阴影.但是,有时,例如当应用程序显示标题栏时,或者在某些其他情况下(例如在Twitter应用程序或市场中),阴影效果消失.我的猜测是,当下面的内容可以滚动时,阴影应该在那里.

但是,在我的应用程序中,下面的内容无法滚动,我认为徽标顶部的阴影看起来很糟糕.

有谁知道如何禁用它?

Com*_*are 29

<!-- Variation on the Light theme that turns off the title -->
<style name="Theme.IOSched" parent="android:style/Theme.Light">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>
Run Code Online (Sandbox Code Playgroud)

android:windowContentOverlay是你的影子,并@null在你的主题中设置它将消除它.您可以在Google I | O 2010会议应用中看到这一点,该应用使用了许多与新Twitter应用相同的UI约定.但是,现在,Twitter应用还没有开源,这就是为什么我指向你的I | O应用程序.上面的代码片段来自该应用程序的styles.xml资源.