Delete default mark at the top of activity layout?

I have activity. It does not have a title bar. Content presentation is just a linear layout. It looks like the android is painting a shadow at the top of my content, right below the status bar. Is there any way to stop this from drawing?

My layout is only:

<LinearLayout ... /> 

I have no title:

 requestWindowFeature(Window.FEATURE_NO_TITLE); 

Thanks.

+4
source share
2 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> 
+26
source

In res / values ​​/styles.xml:

 <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.Custom" parent="@android:style/Theme.NoTitleBar"> <item name="android:windowContentOverlay">@null</item> </style> </resources> 
+3
source

All Articles