开发者

Remove Gradient at Android Bar Control

开发者 https://www.devze.com 2023-03-09 13:38 出处:网络
Does anyone know 开发者_如何学编程how can I remove this gradient highlighted in red? I\'m using the theme Light.NoTitleBar\".

Does anyone know 开发者_如何学编程how can I remove this gradient highlighted in red? I'm using the theme Light.NoTitleBar".

Remove Gradient at Android Bar Control


You can make a custom theme in res/values/styles.xml that looks like this:

<!-- No Activity DropShadow -->
<style name="Theme.NoTitleOrDrop" parent="@android:style/Theme.NoTitleBar">
    <item name="android:windowContentOverlay">@null</item>
</style>

And then reference it in your manifest like this:

<application
    android:label="@string/app_name"
    android:icon="@drawable/icon"
    android:theme="@style/Theme.NoTitleOrDrop"
    android:name="@string/app_name>
    ...

This should get rid of that top shadow. You can use this theme on a per Activity basis or in Application like I did in the example to work on all Activities.

0

精彩评论

暂无评论...
验证码 换一张
取 消