TextViews
2 つの異なる に配置されたトウのベースラインを揃えたいRelativeLayouts
。以下は私が使用しているコードです:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="right">
<TextView
android:id="@+id/tv_city_a"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="City"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_city_b"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/tv_city"
android:background="@drawable/txt_field_white"/>
</RelativeLayout>
tv_city_a
のベースラインを合わせたいのですtv_city_b
が、上記のコードが機能しません。
注:設計要件により、 をTextView
2 つの異なるに配置する必要がありRelativeLayout
ます。私はそれらを1つに入れることはできません。
編集以下は私が得ている出力です: