helllo,我嘗試創建標籤視圖必須有一些元素在我的情況下他們是seekbar和水平線性佈局與2 textview,但它只顯示這樣的元素在頂部。 這樣的形象在:此選項卡的標籤主機不顯示所有元素
XML代碼:
<LinearLayout
android:id="@+id/tvTab2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:text="@string/bspa_count_of_hours"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TextView
android:id="@+id/bspa_count_of_hours_value"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
</LinearLayout>
<SeekBar
android:id="@+id/bspa_seekbar_count_of_hours"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
'機器人:layout_height = 「match_parent」'應該是' android:layout_height =「wrap_content」內部的LinearLayout填充父項。 –