Remove Gradient at Android Bar Control
Does anyone know 开发者_如何学编程how can I remove this gradient highlighted in red? I'm using the theme Light.NoTitleBar".
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.
精彩评论