它在纵向模式下工作正常,但在横向模式下,它首先显示Actionbar选项卡,然后自定义视图,以便plz帮助我
ActionBar bar = getSupportActionBar();
LayoutInflater minflate =(LayoutInflater)
bar.getThemedContext().getSystemService(LAYOUT_INFLATER_SERVICE);
View mview = minflate.inflate(R.layout.customtab,null);
bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
ActionBar.DISPLAY_SHOW_CUSTOM|ActionBar.DISPLAY_SHOW_HOME|ActionBar.DISPLAY_SHOW_TITLE);
bar.setCustomView(mview, new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT
,ViewGroup.LayoutParams.MATCH_PARENT));
setContentView(R.layout.activity_birthday_report);
//ActionBar bar = getSupportActionBar();
Drawable d = getResources().getDrawable(R.color.actiobar);
bar.setBackgroundDrawable(d);
bar.setDisplayShowTitleEnabled(false);
bar.setDisplayShowHomeEnabled(false);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);