私はScrollView
親として持っています。中にはLinearLayout
と がImageView
ありTabHost
ます。TabHost
via アクティビティのコンテンツを変更します。コンテンツを変更すると、Tabhost
独自のタブまでスクロールダウンし、ヘッダーが表示されなくなります。どうすればこれを防ぐことができますか?
私のmain.xml:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/mainScroll"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" >
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="800px"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="5dp" >
<ImageView
android:id="@+id/header"
android:layout_width="800px"
android:layout_height="200px"
android:src="@drawable/header" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="wrap_content"
android:layout_height="50px" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>
</ScrollView>
コンテンツを変更するマイ アクティビティ:
public class UeberActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ueber);
}
}
このスクロールを回避するにはどうすればよいですか?