TV2 が TV1 に対して相対的であり、TV1 と TV2 がレイアウトの異なるブランチ内にある場合、このようなことを行うことは可能ですか?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="@+id/RV1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/TV01"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:text="test text" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/RV2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/RV1" >
<TextView
android:id="@+id/TV02"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_toRightOf="@+id/TV01" <--------- this references TV01 within the top RelativeView !!!
android:text="other text" />
</RelativeLayout>
</RelativeLayout>
この例では、は別の RealtiveLayout ブランチ内android:layout_toRightOf="@+id/TV01"
にあるため、ステートメントは機能していないようです。TV01
TV02
どういうわけかこのような参照を作成する方法はありますか?
どうもありがとう!