Здравствуйте, имеется такая проблема - слишком большой отступ слева к иконке. Не знаю почему так получилось, дело явно не в иконке самой, я делал различные иконки, через сервисы тоже.
Вот как это выглядит:
Мой MainActivity:
setContentView(R.layout.activity_main);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
final ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
mSectionsPagerAdapter = new TabPagerAdapter(getSupportFragmentManager());
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setOffscreenPageLimit(mSectionsPagerAdapter.getCount());
mViewPager.setAdapter(mSectionsPagerAdapter);
mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
actionBar.setSelectedNavigationItem(position);
}
});
for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
actionBar.addTab(
actionBar.newTab()
.setText(mSectionsPagerAdapter.getPageTitle(i))
.setTabListener(this));
}
Ну и может кому нужен файл стиля:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="@android:style/Theme.Holo.Light">
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:actionBarItemBackground">@drawable/selectable_background_Myapp</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Myapp</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Myapp</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Myapp</item>
<item name="android:actionBarTabTextStyle">@style/tabtextcolor</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Myapp</item>
<item name="android:actionBarStyle">@style/ActionBar.Solid.Myapp</item>
<item name="android:actionModeBackground">@drawable/actionmode_style</item>
<item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_Myapp</item>
<item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Myapp</item>
<item name="android:homeAsUpIndicator">@drawable/ic_action_previous_item</item>
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
</style>
<style name="ActionBar.Solid.Myapp" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">
<item name="android:background">@drawable/ab_solid_Myapp</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_solid_Myapp</item>
<item name="android:backgroundSplit">@drawable/ab_bottom_solid_Myapp</item>
<item name="android:progressBarStyle">@style/ProgressBar.Myapp</item>
</style>
<style name="ActionBar.Transparent.Myapp" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:background">@drawable/ab_transparent_Myapp</item>
<item name="android:progressBarStyle">@style/ProgressBar.Myapp</item>
</style>
<style name="PopupMenu.Myapp" parent="@android:style/Widget.Holo.Light.ListPopupWindow">
<item name="android:popupBackground">@drawable/menu_dropdown_panel_Myapp</item>
</style>
<style name="DropDownListView.Myapp" parent="@android:style/Widget.Holo.Light.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_Myapp</item>
</style>
<style name="ActionBarTabStyle.Myapp" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_Myapp</item>
</style>
<style name="tabtextcolor" parent="@android:style/Widget.ActionBar.TabText">
<item name="android:textColor">@drawable/tab_text_color</item>
<item name="android:textSize">@dimen/tab_text_size</item>
</style>
<style name="DropDownNav.Myapp" parent="@android:style/Widget.Holo.Light.Spinner">
<item name="android:background">@drawable/spinner_background_ab_Myapp</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_Myapp</item>
<item name="android:dropDownSelector">@drawable/selectable_background_Myapp</item>
</style>
<style name="ProgressBar.Myapp" parent="@android:style/Widget.Holo.Light.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_Myapp</item>
</style>
<style name="ActionButton.CloseMode.Myapp" parent="@android:style/Widget.Holo.Light.ActionButton.CloseMode">
<item name="android:background">@drawable/btn_cab_done_Myapp</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Myapp.Widget" parent="@android:style/Theme.Holo">
<item name="android:popupMenuStyle">@style/PopupMenu.Myapp</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Myapp</item>
</style>
<style name="login_background">
<item name="android:background">@drawable/enter_login_style</item>
</style>
<style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">@drawable/ic_action_overflow</item>
</style>
</resources>
Собственно сабж, как это исправить?