去除通知栏的影子在Android应用程序 [英] remove notification bar shadow in android app
问题描述
在Android上,在顶部通知栏有大部分时间了一层阴影。但是,有时,例如,当一个应用程序有它的标题栏显示,还是在其他一些情况下(比如在Twitter的应用程序或市场)的阴影效果消失。我的猜测是,影子应该在那里当该内容下面可以滚动。
在我的应用程序,但是,在该内容下面不能滚动,而且我觉得影子看起来不好对我的标志上半部分。
有谁知道如何禁用呢?
<! - 变化的光的主题,关闭标题 - >
<样式名称=Theme.IOSched父=机器人:款式/ Theme.Light>
<项目名称=机器人:windowNoTitle>真< /项目>
<项目名称=机器人:windowContentOverlay> @空< /项目>
< /风格>
在安卓windowContentOverlay
是你的影子,在你的主题,将其设置为 @null
将消除它。你可以看到这个在谷歌I动作|Ø2010会议应用,它使用许多相同的用户界面公约一样的新的Twitter应用程序。然而,现在,Twitter的应用程序,至今还没有开源的,这就是为什么我点你给我|邻应用程序。上面的code段是从该应用程序的<一个href="http://$c$c.google.com/p/iosched/source/browse/trunk/res/values/styles.xml"><$c$c>styles.xml$c$c>资源。
In android, the notification bar at the top has a shadow most of the time. However, sometimes, such as when an app has it's title-bar showing, or in some other cases (such as in the twitter app or the market) that shadow effect is gone. My guess is that the shadow is supposed to be there when the content underneath can scroll.
In my app, however, the content underneath can't scroll, and I think the shadow looks bad on the top part of my logo.
Does anyone know how to disable it?
<!-- 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>
The android:windowContentOverlay
is your shadow, and setting it to @null
in your theme will eliminate it. You can see this in action in the Google I|O 2010 conference app, which uses many of the same UI conventions as does the new Twitter app. However, right now, the Twitter app has not yet been open-sourced, which is why I point you to the I|O app. The code fragment above is from that app's styles.xml
resource.
这篇关于去除通知栏的影子在Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!