android - Align base line of textviews in two different layouts -


i want align baselines of tow textviews placed in 2 different relativelayouts. following code using:

        <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> 

i want align baseline of tv_city_a tv_city_b above code not working.

note: due design requirements, need place textview's in 2 different relativelayout's. can not put them in one.

edit following output getting: enter image description here

you can't link baseline views different parents. options join them in 1 relativelayout or make them align giving correct padding, margin, parent aligning etc. etc.

edit: wrong output comming because have android:paddingtop="5dp" in second relativelayout


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -