smallzhan
smallzhan

Reputation: 137

how to remove this "line" between the actionbar and the activity layout

I've tested the translucent actionbar and transparent system bar in android 4.4, but there are a "line" between the actionbar and the layout of the activity. See the attached image.

What is interesting is that When I turned the value of "targetSDKVersion" to 18 other than 19, this line is gone.

what in my style.xml is :

   <style name="MyBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"></style>

   <style name="MyTheme" parent="MyBaseTheme">
     <item name="android:actionBarStyle">@style/MyActionBarStyle</item>
      ....
   </style>


   <style name="MyActionBarStyle" parent="android:Widget.Holo.ActionBar">
    <item name="android:background">@color/lentil_background_alpha</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:titleTextStyle">@style/ActionBarTitleTextStyle</item>
</style>

The translucent styles in values-v19:

  <style name="MyBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
</style>

enter image description here

Upvotes: 2

Views: 1129

Answers (1)

Byte Brad
Byte Brad

Reputation: 2357

Add this like in your within style tag

<item name="android:windowContentOverlay">@null</item>

Your styles should look like

 <style name="MyTheme" parent="MyBaseTheme">
 <item name="android:windowContentOverlay">@null</item> 
 <item name="android:actionBarStyle">@style/MyActionBarStyle</item>
 </style>    

This will remove the shaded line.

Upvotes: 2

Related Questions