After removing each used style, I got the following image:

This image also contains small spaces. Therefore, it seems that this is some kind of default behavior.
However, I found a way around the problem. I set the red line as the standard background for the entire panel. Thus, a space appears, but no one sees it, because a background is displayed that already contains a string.
Now I use the following style for all my actions:
<style name="LightThemeSelector" parent="android:Theme.Holo.Light"> <item name="android:actionBarTabBarStyle">@style/customTabBar</item> <item name="android:actionBarTabStyle">@style/customTabStyle</item> </style>
This style is used to style each individual tab in a tab:
<style name="customTabStyle" parent="@android:style/Widget.Holo.ActionBar.TabView"> <item name="android:showDividers">none</item> <item name="android:measureWithLargestChild">true</item> <item name="android:background">@drawable/tab_line</item> <item name="android:gravity">center</item> </style>
To create a style in Tabbar, I use the following style:
<style name="customTabBar" parent="@android:style/Widget.Holo.ActionBar.TabBar"> <item name="android:showDividers">middle</item> <item name="android:divider">@drawable/divider</item> <item name="android:dividerPadding">0dp</item> <item name="android:background">@drawable/tab_unselected</item> </style>
This style defines my custom separator, and also defines the background for the tab. As a background, I directly set nine patches that stretch if the tab is not selected. The result of all this is a panel with a red underline without spaces.

Janusz Feb 07 2018-12-12T00: 00Z
source share