Q:

how to change the ActionBar Tab text color with one line layout? 

There are two line layout,look at the ActionBar Tab, the text Color is blue;

and this is one line layout,texColor is white,How could you make it ? 

A:

1 To change the Tab Style,you cannot use actionBar.newTab().setText(xxx)，because you cannot fetch the TextView,so you must create a TextView,then use actionBar.newTab().setCustomView(tabView);
private TextView createTab(int titleText) {
    TextView textView = new TextView(this,null,R.attr.actionBarTabTextStyle);
    textView.setGravity(Gravity. CENTER_VERTICAL);
    textView.setEllipsize(TextUtils. TruncateAt. END);
    LinearLayout. LayoutParams lp = new LinearLayout. LayoutParams(LinearLayout. LayoutParams. WRAP_CONTENT,
            LinearLayout. LayoutParams. MATCH_PARENT);
    textView.setLayoutParams(lp);
    textView.setText(titleText);
    return textView;
}

2 Look at the R.attr.actionBarTabTextStyle attribute,you must write a line in attrs.xml
//attrs.xml
<attr name="actionBarTabTextStyle" format="reference"/>

It is a reference of styles,in styles/xml or theme.xml
<style name="MyTheme" parent="android:style/Theme. Holo. Light. DarkActionBar">
    <item name="android:actionBarTabTextStyle">@style/ActionBarTabTextStyle</item>
    <item name="actionBarTabTextStyle">@style/ActionBarTabTextStyle</item>
</style>

3 create a Tab and add it to ActionBar:
// MainActivity
TextView tabView=createTab(tabTitle);
ActionBar. Tab actionBarTab=actionBar.newTab();
actionBarTab.setCustomView(tabView).setTabListener(this)
actionBar.addTab(actionBarTab);

4 ActionBar have a private field:mHasEmbeddedTabs,when in one line it is true,other is false,so just fetch this field's value. 
private boolean mHasEmbeddedTabs =true;
@Override
public void onCreate(Bundle savedInstanceState) {
    try {
        Field field = actionBar.getClass().getDeclaredField("mHasEmbeddedTabs");
        field.setAccessible(true);
        this.mHasEmbeddedTabs=field.getBoolean(actionBar);
    } catch (NoSuchFieldException e) {
        e.printStackTrace();
    } catch (IllegalAccessException e) {
        e.printStackTrace();
    }
}

5 Now I can change the Tab Text Color when the actionbar and tab in one line
if(this.mHasEmbeddedTabs){
   tabView.setTextColor(getResources().getColor(R.color.white));
}

