I want to remove the separator under the action bar

What I'm trying to do is exactly as shown in the image " my problem

I want to remove this separator. I use the built-in Android action bar. I donโ€™t want to use Sherlockโ€™s action bar. I have to use the Android action bar.

I tried adding this to my styles, but didn't work

<style name="MyDropDownNav" parent="android:style/Theme.Holo.Light"> <item name="android:dropDownSelector">@drawable/ic_launcher</item> <item name="android:divider">@null</item> </style> 

Do you have any suggestions?

+3
source share
3 answers

You can implement the Translucent Action Bar :

Custom Transparent Android ActionBar

Show ImageView partially behind transparent ActionBar

Define themes :

 <resources> <style name="Theme.TranslucentActionBar" parent="@android:style/Theme.Holo.Light.DarkActionBar"> <item name="android:actionBarStyle">@style/Widget.ActionBar</item> </style> <style name="Theme.TranslucentActionBar.ActionBar" /> <style name="Theme.TranslucentActionBar.ActionBar.Overlay"> <item name="android:actionBarStyle">@style/Widget.ActionBar.Transparent</item> <item name="android:windowActionBarOverlay">true</item> </style> </resources> 

and styles for your Action Bar :

 <resources> <style name="Widget.ActionBar" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse"> <item name="android:background">@drawable/ab_background</item> </style> <style name="Widget.ActionBar.Transparent"> <item name="android:background">@android:color/transparent</item> </style> </resources> 

Then apply it in AndroidManifest.xml .

+7
source
 <style name="AppTheme" parent="android:Theme.whatever_theme_you_have"> ... <item name="android:windowContentOverlay">@null</item> </style> 
+1
source

The separator is contained in the background image of the taskbar.

Try changing the background image of the taskbar. See codes below.

 <style name="AppTheme"> <item name="android:actionBarStyle">@style/ActionBarStyle</item> </style> <style name="ActionBarStyle"> <item name="android:background">{SET BACKGROUND FOR YOU}</item> </style> 
0
source

Source: https://habr.com/ru/post/977683/


All Articles