アクションバーに3つのタブがあります。 次のようになります。 |すべて|コール|ネットワーク| 私は彼らに同じ幅を持たせたい。どうしたらいいですか?ActionBarタブの太さ/幅
0
A
答えて
2
としてタブホストを設定します。タブ。これが私のやり方です。私の場合、ActionBar.Tagで使われている組み込みのレイアウトに似ていたレイアウトからカスタムビューがロードされます。必要なものにマージン、サイズ、コンテンツを設定します。
0
彼らはすべて
<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
</TabHost>
同じ幅の列に整列してから、アクションバーにsetCustomView()メソッドを使用して任意のビューにタグを設定することができ
TabHost tabHost;
TabHost.TabSpec spec;
tabHost=getTabHost()
Intent intent;
intent=new Intent().setClass(this, BirthDayTab.class);
spec=tabHost.newTabSpec("artists").setIndicator("BirthDay",res.getDrawable(R.drawable.ic_tab_artists)).setContent(intent);
tabHost.addTab(spec);
+2
番号を探している正確なソリューションです。 ** ActionBarタブ** –
-1
https://groups.google.com/forum/#!topic/actionbarsherlock/4oT9KwhB0O8 これは、私はあなたが定期的にタブについて話している日
関連する問題
- 1. ActionBarタブの幅
- 2. ActionBarのタブ数
- 3. Android ActionBarタブ - ListFragment問題
- 4. ActionBar Sherlockタブのカスタムビューを設定する
- 5. Android ICS + ActionBarタブ+オリエンテーションの変更
- 6. フラグメントをベースにしたタブ(ActionBarなし)
- 7. コンテナの幅は太字で表示されます
- 8. CKEDITORのデフォルトのタブ幅の幅
- 9. jquery UIタブ幅100%
- 10. フラグメント間のトランザクションは1つのActionBarタブ内
- 11. ActionBarタブから現在のフラグメントを取得
- 12. ActionBarタブの内容が重複しています
- 13. jQuery-UIタブのフォントサイズとタブ幅と高さを変更する方法
- 14. 軸のインラインスタイルのストローク幅が太字の目盛りラベル
- 15. HTML:太い太字のタグも太字の書式で表示された後
- 16. カスタムビューとタブでAndroid ActionBarを作成する方法
- 17. ActionBarタブはwrap_contentではありません
- 18. タブ可動のTabControl - 選択したタブの項目幅
- 19. jQueryのタブは次の幅とPREVは
- 20. 分割されたテキストActionBar
- 21. の変更フォントの太さ
- 22. ボーダーの太さの変化
- 23. コアテキストの幅を調整するタブ
- 24. ActionBarのナビゲーションタブでカスタムビューを設定し、タブをその高さに適応させる方法は?
- 25. Jquery mobile navbarフォントの太さ
- 26. Android ActionBarの高さの問題
- 27. 同じActionBarの高さのAndroidビュー
- 28. ActionBarのインポートが認識されない
- 29. ActionBarのHamBurgerアイコン
- 30. ActionBarサポートライブラリ
私はそれを試してみましょうについて話しています。ありがとう。 –
Urielさん、うまくいきましたか? – habitats