내 안드로이드 응용 프로그램의 각 화면 내에서 스크롤 할 수 있기를 원합니다. 스크롤하면 탭 막대도 스크롤 할 수 있습니다. 내 코드는 작동합니다. 그러나 탭 막대가있는 화면으로 가면 탭 막대가 보이지 않습니다. 위로 스크롤해야하는 탭 막대가 보입니다. 기본적으로 탭 표시 줄을 볼 수있는 방법이 있습니까? 감사tabhost xml의 ScrollView - android
내 tab_host.xml 코드
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@android:id/tabhost">
<ScrollView
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<LinearLayout
android:id="@+id/LinearLayout01"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<TabWidget
android:id="@android:id/tabs"
android:layout_height="wrap_content"
android:layout_width="fill_parent">
</TabWidget>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
</FrameLayout>
</LinearLayout>
TabWidget이 보이지 않는 것을 의미합니까? FrameLayout에 문제가있는 경우 layout_height = "0dp"및 layout_weight = "1"을 설정하십시오. –
또한 연습을 위해 "fill_parent"가 아닌 "match_parent"를 사용하십시오. –
이 작동하지 않습니다. ( – user3156801