私はRelativeLayouts
自分のアプリに 2 つを使用することにしました。1 つは画面の左側Layout
の子の部分、もう 1 つは子が右側に移動する部分です。Views
Views
問題は、XML でそれらをレイアウトする方法がわからないため、Layout
.
1 を使用するRelativeLayout
と、真ん中の空白が で埋められ、RelativeLayout
その後ろには何も触れられません。
読んでいただきありがとうございます。
私はRelativeLayouts
自分のアプリに 2 つを使用することにしました。1 つは画面の左側Layout
の子の部分、もう 1 つは子が右側に移動する部分です。Views
Views
問題は、XML でそれらをレイアウトする方法がわからないため、Layout
.
1 を使用するRelativeLayout
と、真ん中の空白が で埋められ、RelativeLayout
その後ろには何も触れられません。
読んでいただきありがとうございます。
次の例と同様のことを行います。
これにより、LinearLayout
with 2RelativeLayouts
を使用layout_weight
してが作成され、RelativeLayouts
に必要なものを入力できRelativeLayouts
ます。
はButtons
、例の単なるプレースホルダーです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TEST1" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TEST2" />
</RelativeLayout>
</LinearLayout>