私は2つのLinearLayoutsとボタンを相対レイアウト内に持っています。トップバー(画面の約20%)の約(画面の大半を占めるscrollviewの要素のtop、center、bottom要素を持つレイアウトを設定するにはどうすればよいですか?
ロットで
AのLinearLayout 60: 彼らは次のようになります。画面の%)
私はこれを試みた
底画面の(約20%)にあるボタン:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/layoutTopBlack"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<include layout="@layout/top_black_bar_cancel_register_button"/>
</LinearLayout>
<LinearLayout
android:id="@+id/layoutCenter"
android:layout_below="@id/layoutTopBlack"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include layout="@layout/top_black_bar_cancel_register_button"/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/buttonNextStep"
android:text="@string/next_step"
style="@style/mainButtonStyle"/>
</RelativeLayout>
これは機能しません。レイアウトセンターがボタンの上に横たわっているので、ボタンが表示されることはありません。
提案がありますか?
ありがとうございます。
編集: 私は編集者からこれを見つけた: ジャストボタンの上に自分自身をレイアウトするために、あなたのlayoutCenterを伝えるリソース@のID/layoutTopBlack
私は@ + id/ – Ikky
@Ikkyでリソースを追加したにもかかわらず、リソース@ id/layoutTopBlackを解決できませんでした。どのようにリソースを解決できなかったことで問題を解決しましたか?私は通常、@ + id /でリソースを動かすだけで動作します。 –