how to place one image at the corner of another in relative layout in android?
I have two images. image A is a rectangle one and image B is a circular one. I want image B to be at the lower right corner of image A - 1/4th of it inside image A and the other 3/4th of it outside.
I am not sure how to do this using relative layout for开发者_JS百科 my android app. Any help ?
Thanks.
this code may help you.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/imagepart"
android:layout_width="72dp"
android:layout_height="72dp"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
/>
<ImageView android:id="@+id/imgOnlinePart" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentLeft="true"
android:layout_alignBottom="@+id/imagepart" android:src="@drawable/online"/>
</RelativeLayout>
精彩评论