例として見つけたこの単純なレイアウトがあります。
<?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:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:fillViewport="true"
android:scrollbars="none" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center" />
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</FrameLayout>
</LinearLayout>
</TabHost>
コードに 8 つのタブを追加した後、それらが一緒に圧縮されていることがわかります。タブにスクロール可能な機能を追加するにはどうすればよいですか? (コンテンツではなく、タブのみ)
私の電話の1つのアプリにはこれがあり、それもスクロールバーなしで行われます. 基本的に、移動するには、タブを押したままにして左にドラッグし、さらにタブを表示します。これはどのように達成できますか?