Android 如何删除动作栏并设置Sherlock FragmentActivity的自定义标题

Android 如何删除动作栏并设置Sherlock FragmentActivity的自定义标题,android,android-actionbar,actionbarsherlock,android-fragmentactivity,Android,Android Actionbar,Actionbarsherlock,Android Fragmentactivity,您好,我正在使用Sherlock库来实现标签。在这里,我希望删除顶部的ActionBar,并设置自定义标题布局 我实现了添加选项卡的功能,但无法在ActionBar上设置自定义标题。有办法吗 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_pay_stub);

您好,我正在使用Sherlock库来实现标签。在这里,我希望删除顶部的ActionBar,并设置自定义标题布局

我实现了添加选项卡的功能,但无法在ActionBar上设置自定义标题。有办法吗

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_pay_stub);

    // adding action bar tabs to the activity
    ActionBar mActionBar = getSupportActionBar();
    Tab firstTab = mActionBar.newTab().setText(getString(R.string.paystub_current_tab)).setTabListener(this);
    Tab secondTab = mActionBar.newTab().setText(getString(R.string.paystub_all_tab)).setTabListener(this);

    // add the tabs to the action bar
    mActionBar.addTab(firstTab);
    mActionBar.addTab(secondTab);

    // set the navigation mode the Action Bar Tabs
    mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

}

提前感谢。

我通过添加操作栏的背景色和图标解决了这个问题

ActionBar actionBar = getSupportActionBar();
setTitle("");
actionBar.setIcon(R.drawable.headerlogo);
actionBar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#F4A401")));