ActionBar
Icon、Tabs、MenuButtonを1行で作成したいのですが、次のコードを使用すると、PrintScreenのように2行になります。
java:
viewPager = (ViewPager) findViewById(R.id.pager);
bar = getSupportActionBar();
bar.setIcon(R.drawable.ic_map);
bar.setDisplayShowHomeEnabled(false);
bar.setDisplayShowTitleEnabled(false);
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
TabsAdapter tabsAdapter = new TabsAdapter(this, viewPager);
tabsAdapter.addTab(bar.newTab().setText("A"), ClientTemplates.class, null);
tabsAdapter.addTab(bar.newTab().setText("B"), ClientWalletsCards.class, null);
tabsAdapter.addTab(bar.newTab().setText("C"), ClientReports.class, null);
XML:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingRight="1px"
android:paddingLeft="1px"/>
1行だけを取得するには、コードで何を変更する必要がありますか?