Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove default drop shadow at top of activity layout?

Tags:

android

I have an activity. It does not have a title bar. The content view is just a linear layout. It looks like android draws a drop shadow at the top of my content view, directly below the status bar. Is there a way to stop that from being drawn?

My layout is just:

<LinearLayout ... />

I have no titlebar:

requestWindowFeature(Window.FEATURE_NO_TITLE);

Thanks.

like image 273
user291701 Avatar asked Nov 28 '22 06:11

user291701


1 Answers

In res/values/styles.xml:

<style name="Theme.Custom" parent="@android:style/Theme.NoTitleBar">
    <item name="android:windowContentOverlay">@null</item>
</style>

Then in your manifest:

<activity android:name=".YourActivity" 
    android:theme="@style/Theme.Custom" >
...
</activity>
like image 156
Paul Burke Avatar answered Dec 17 '22 20:12

Paul Burke