android - How to position a TextView inside a RelativeLayout from another RelativeLayout? -
i having problem need place textview(green) inside relativelayout(blue) below relativelayout(black) imageview(orange) stays overlapping
here's legend:
- relativelayout(black) id/image_view_container
- imageview(brown)
- relativelayout(blue)
- imageview(orange) id/profileimage
- textview(green)
i tried:
android:layout_torightof="@id/profileimage" android:layout_below="@id/image_view_container"
but it's not working, because image_view_container
relativelayout.
i need assistance in this, ahead!
edit:
<relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/image_view_container" > <imageview android:id="@+id/mainimage" android:layout_width="fill_parent" android:layout_height="210dp" android:background="#ffffff" /> </relativelayout> <relativelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margintop="-30dp" android:gravity="bottom" android:orientation="horizontal" > <imageview android:id="@+id/profileimage" android:layout_width="50dp" android:layout_height="50dp" android:layout_marginleft="20dp" android:layout_weight="0" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:scaletype="centercrop" /> <textview android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_below="@id/image_view_container" android:layout_torightof="@id/profileimage" android:layout_weight="1" android:text="6363" android:textcolor="@color/a" android:textsize="20sp" android:textstyle="bold" android:translationy="5dp" /> </relativelayout>
try following in image_view_container
android:layout_alignparentbottom="true" android:layout_alignparentleft="true"
Comments
Post a Comment