0
だから私は「match_parent」にlayout_widthセットを持っているのLinearLayoutは、のは、次に、その内のHorizontalScrollViewがありますHorizontalScrollViewの子の子を画面の幅にするにはどうすればよいですか?
、のはB.
はその後RelativeLayoutは、内があることを呼ぶことにしましょうというA.を呼びましょう持っています1つの直接の子intをスクロール表示できるルールのために使用しています。
次に、Aと同じ幅にする複数のRelativeLayoutsがありますその他。私がこれをどのように達成できるかを教えてください!ユーティリティメソッドの下に使用して、画面の
<LinearLayout
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical" >
<HorizontalScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:fillViewport="true"
android:layout_weight="9">
// Used because ScrollView can have only 1 child.
<RelativeLayout
android:id="@+id/directChild"
android:layout_width="wrap_content"
android:layout_height="match_parent">
// This is the RelativeLayout that I want to fill the screen width with.
<RelativeLayout
android:id="@+id/howToMakeScreenWidth"
android:layout_width="385dp"
android:layout_height="match_parent">
をその幅を割り当てますスクリーン。 –
スクロールビューには右にスクロールする機能があるため、ScrollViewのスクロール可能な距離の長さにRelativeLayoutストレッチを行います。次のようになります。http://pasteboard.co/2STAt2Seg.png –
答えが更新されました。 – Rahul