<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <View android:id="@+id/view1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="#40E0D0" /> <Button android:id="@+id/Buttondeepgreen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/Buttonblack" android:layout_alignBottom="@+id/Buttonblack" android:layout_toLeftOf="@+id/Buttonblack" android:background="#006400" android:minHeight="80dip" android:minWidth="80dip" /> <Button android:id="@+id/Buttonblack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:background="#000000" android:minHeight="80dip" android:minWidth="80dip" /> <Button android:id="@+id/Buttondeepblue" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/Buttonblack" android:layout_alignBottom="@+id/Buttonblack" android:layout_toRightOf="@+id/Buttonblack" android:background="#0000AA" android:minHeight="80dip" android:minWidth="80dip" /> <Button android:id="@+id/Buttonred" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/Buttondeepgreen" android:layout_toLeftOf="@+id/Button