1
私は、画像ビューとスクロールビューを含むlinearlayout Aを持っています。スクロールビューには2番目の線画が含まれていますB linearLayout Bにはスクロールビューの高さに正確に一致する複数のビューが含まれていますが、固定ヘッダーを使用することです。スクロールビューですべてのタブが後に続くタブビューとしてください。 fill_parentの場合でもScrollViewの高さは0です
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/main_view"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical">
<ImageView android:id="@+id/logoImg"
android:layout_width="fill_parent"
android:gravity="center"
android:src="@drawable/logo"
android:layout_height="wrap_content"/>
<ScrollView
android:id="@+id/scrollView"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:id="@+id/scrollLinear"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</ScrollView>
</LinearLayout>
私はscrollView上のgetHeightを呼び出すことによって、これを達成し、その後のLinearLayout Bにそれぞれ表示するには、この高さを設定しようとしましたが、のgetHeightは常に0 誰もこれを達成するための最も簡単な方法何のアイデアを返しますか?
私は申し訳ありませんが、私はそれを取得しません...あなたは、垂直タブビューと同等のものが欲しいですか?なぜスクロールビューを使用するのですか? – Sephy
さて、私はアニメーションのタブビューが必要です。タブをクリックすると、スクロールビューを正しい位置にスクロールして正しいタブが表示されます。私はこれがいいと思う。同じ機能効果を達成するためにタブビューを使用できますが、同じビジュアルエフェクトは使用できません。 – Tin