
I want to create a layout like this and handle click event based on irregular sahpes. but I don't know how to do this any help would be appreciated.

I want to create a layout like this and handle click event based on irregular sahpes. but I don't know how to do this any help would be appreciated.
Using a RelativeLayout. Make sure the circle comes after the squares in the xml, so it'll be in front of them.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_purple" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/centerLine"
android:orientation="horizontal" >
<ImageView
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginRight="2dp"
android:layout_weight="1"
android:src="@android:color/holo_orange_dark" />
<ImageView
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginLeft="2dp"
android:layout_weight="1"
android:src="@android:color/holo_green_dark" />
</LinearLayout>
<View
android:id="@+id/centerLine"
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_centerVertical="true"
android:background="@android:color/holo_purple" />
<LinearLayout
android:id="@+id/bottomSquares"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/centerLine"
android:layout_centerVertical="true"
android:orientation="horizontal" >
<ImageView
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginRight="2dp"
android:layout_weight="1"
android:src="@android:color/holo_red_light" />
<ImageView
android:layout_width="0dp"
android:layout_height="100dp"
android:layout_marginLeft="2dp"
android:layout_weight="1"
android:src="@android:color/holo_blue_light" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@drawable/circle" />
</RelativeLayout>