現在、Scrollview に埋め込まれた RelativeLayout を作成しようとしています (したがって、RelativeLlayout のコンテンツを垂直方向にスクロールできます)。私のレイアウトファイルは次のようになります。
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/label_first_day_of_budget_cycle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="10dp"
android:text="@string/first_day_of_budget_cycle"
android:textSize="20sp" />
<include
android:id="@+id/settings_divider_one"
android:layout_alignParentLeft="true"
android:layout_below="@id/label_first_day_of_budget_cycle"
layout="@layout/w_divider" />
<TextView
android:id="@+id/label_monthly_income"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_below="@id/settings_divider_one"
android:layout_margin="10dp"
android:text="@string/monthly_income"
android:textSize="20sp" />
<include
android:id="@+id/settings_add_income"
android:layout_alignParentLeft="true"
android:layout_below="@id/label_monthly_income"
layout="@layout/w_add" />
<include
android:id="@+id/settings_divider_two"
android:layout_alignParentLeft="true"
android:layout_below="@id/settings_add_income"
layout="@layout/w_divider" />
<TextView
android:id="@+id/label_monthly_expenses"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_below="@id/settings_divider_two"
android:layout_margin="10dp"
android:text="@string/monthly_expenses"
android:textSize="20sp" />
<include
android:id="@+id/settings_add_expenses"
android:layout_alignParentLeft="true"
android:layout_below="@id/label_monthly_expenses"
layout="@layout/w_add" />
<include
android:layout_alignParentLeft="true"
android:layout_below="@id/settings_add_expenses"
layout="@layout/w_divider" />
</RelativeLayout>
</ScrollView>
そして、これは私の電話でどのように見えるかです:
ネットやスタックオーバーフローで考えられる/見つけることができるすべてのバリエーションを試しましたが、これまでのところ成功していません。他に何を試すことができるのか、ここで何が欠けているのかわかりません。
RelativeLayout と Scrollview の layout_width と layout_height の値を変えてみましたが、成功しませんでした。私が間違っていることについてのヒントは大歓迎です。
アップデート
ベンの提案に従って、インクルードを削除し、レイアウトを適切にレンダリングしました。私は、Scrollviews に埋め込まれた RelativeLayouts をインクルードする必要があると考えているので、バグ レポートクリックを提出しました。少なくとも、そうすべきではない理由がわかりません。インクルードが適切に機能しない別の間違いがレイアウトに含まれている場合は、チケットでそれに応じて返信されることを願っています。