アプリケーションにTabHostがあり、どちらの方法でも解決できる問題があります。
1) Reduce the font size of the text inside each tab.
2) Make the TabHost scroll-able so that the tabs aren't "scrunched".
これら2つの出力のいずれかを生成するのを手伝ってもらえますか?
テキストサイズを定義し、TabHostを保持するアクティビティのアクティビティタグ内のAndroidマニフェストを介してそれを参照するテーマを使用してみました。
必要に応じて、xmlファイルとクラスファイルを使用してこの投稿を編集します。
2番目のアプローチをお勧めします。それは私がいつも使っているもので、魅力のように機能します。これは、scrollbar = "none"属性を使用してTabWidgetをHorizontalScrollViewでラップすることで構成されます。
たとえば(レイアウトファイル内):
<TabHost
android:id="@+android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/TabLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<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="wrap_content"
android:layout_height="wrap_content"></TabWidget>
</HorizontalScrollView>
<FrameLayout
android:id="@+android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp"></FrameLayout>
</LinearLayout>
</TabHost>
あなたはここでより多くの情報を見つけることができます
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加