Reputation: 578
i want to create a layout to displaying image to overlay one on other like..
what i am trying to create like this type of layout in my layout.
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="150dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">
<RelativeLayout
android:layout_width="130dp"
android:layout_height="130dp"
android:background="@drawable/round_blue"></RelativeLayout>
<RelativeLayout
android:layout_width="130dp"
android:layout_height="130dp"
android:layout_marginLeft="60dp"
android:background="@drawable/round_yellow"></RelativeLayout>
</RelativeLayout>
</RelativeLayout>
my diff circle layout is create by drawable but it will not work, it will create same like that, so any one can help me.
Thanks
Upvotes: 0
Views: 46
Reputation: 622
You could try one like this
<RelativeLayout
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_centerInParent="true">
<RelativeLayout
android:layout_width="120dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:background="#aaff0000"></RelativeLayout>
<RelativeLayout
android:layout_width="120dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="#aa00ff00"></RelativeLayout>
</RelativeLayout>
Upvotes: 2