RelativeLayouts
두 가지로 배치 된 토우베이스 라인을 TextViews
에 정렬하려고합니다.서로 다른 두 레이아웃의 텍스트 뷰 정렬 기준선
<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_b
와 tv_city_a
의 기준선을 정렬 할하지만 위의 코드가 작동하지 않습니다 : 다음은 내가 사용하고있는 코드입니다.
참고 : 인해이 나는 S '의 두 개의 서로 다른 RelativeLayout
에서의'상기 TextView
을 배치해야, 요구 사항을 설계합니다. 나는 그들을 하나에 넣을 수 없다.
수 출력 또는 전체 레이아웃 게시 –
패딩 제거 위쪽. – Anukool
당신은 어떤 선형 레이아웃에 두 상대적 레이아웃을 배치 할 수 있습니다 –