Tôi muốn loại bỏ phần đệm (khoảng trống) giữa các tab của ActionBar.Tùy chỉnh Padding của ActionBar Tabs Hỗ trợ
Tôi đang sử dụng Thư viện hỗ trợ Android V7 (Appcompat) để sử dụng Phân đoạn và ActionBar trong Android 2.2 API 8 dưới dạng minSDK và 4.4 API 19 làm maxSDK.
Tôi đã thử những điều sau đây nhưng nó không thay đổi bất cứ điều gì.
My styles.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
</style>
<style name="AppTheme" parent="AppBaseTheme">
<item name="@style/Widget.AppCompat.ActionBar.TabView">@style/TabBarStyle</item>
</style>
<style name="TabBarStyle" parent="@style/Widget.AppCompat.ActionBar.TabView">
<item name="android:paddingLeft">2dp</item>
<item name="android:paddingRight">2dp</item>
</style>
</resources>
Hoạt động của tôi từ AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:uiOptions="splitActionBarWhenNarrow" >
Ai đó có thể cho tôi xin làm thế nào để mở rộng và sử dụng các chủ đề tùy chỉnh một cách chính xác.