由网友(蹲街角·等爱)分享简介:我怎样才能在我的屏幕上方摆脱梯度(下面的截图蓝色的顶部...通知栏下面)?How can I get rid of the gradient at the top of my screen (the very top of the blue in the screenshot below... below the n...
我怎样才能在我的屏幕上方摆脱梯度(下面的截图蓝色的顶部...通知栏下面)?
How can I get rid of the gradient at the top of my screen (the very top of the blue in the screenshot below... below the notification bar)?
推荐答案
这是主题化;看 windowContentOverlay
属性。特别是,你可以创建一个新的主题:
This is themable; look at the windowContentOverlay
attribute. In particular, you can create a new theme:
<style name="Theme.Foo" parent="android:style/Theme.Light">
<item name="android:windowContentOverlay">@null</item>
</style>
然后宣布你的活动应该使用这个主题:
And then declare that your activity should use this theme:
<activity android:name=".FooActivity"
android:theme="@style/Theme.Foo"> ...
虽然一个更好的选择是设定这个主题为应用程序中的所有活动,一致性:
Although a better option is to set this theme for all activities in the application, for consistency:
<application android:theme="@style/Theme.Foo"> ...
相关推荐
最新文章