<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <View android:id="@+id/view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:background="#48D1CC" tools:layout_editor_absoluteX="0dp" tools:layout_editor_absoluteY="0dp" /> <Button android:id="@+id/white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/green" android:layout_toLeftOf="@+id/black" android:minWidth="80dip" android:minHeight="80dip" android:background="#FFFFFF" tools:layout_editor_absoluteX="85dp" tools:layout_editor_absoluteY="250dp" /> <Button android:id="@+id/purple" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/white" android:layout_alignBottom="@+id/white" android:layout_toRightOf="@+id/white" android:minWidth="80dip" android:minHeight="80dip" android:background="#EE6AA7" tools:layout_editor_absoluteX="165dp" tools:layout_editor_absoluteY="250dp" /> <Button android:id="@+id/yello" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/deepblue" android:layout_alignLeft="@+id/deepblue" android:minWidth="80dip" android:minHeight="80dip" android:background="#FFFF00" tools:layout_editor_absoluteX="245dp" tools:layout_editor_absoluteY="250dp" /> <Button android:id="@+id/green" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="80dip" android:minHeight="80dip" android:layout_alignBaseline="@+id/black" android:layout_alignBottom="@+id/black" android:layout_toLeftOf="@+id/black" android:background="#008B45" tools:layout_editor_absoluteX="85dp" tools:layout_editor_absoluteY="330dp" /> <Button android:id="@+id/black" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:minWidth="80dip" android:minHeight="80dip" android:background="#000000" tools:layout_editor_absoluteX="165dp" tools:layout_editor_absoluteY="330dp" /> <Button android:id="@+id/deepblue" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/black" android:layout_alignBottom="@+id/black" android:layout_toRightOf="@+id/black" android:minWidth="80dip" android:minHeight="80dip" android:background="#191970" tools:layout_editor_absoluteX="245dp" tools:layout_editor_absoluteY="330dp" /> <Button android:id="@+id/red" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/green" android:layout_toLeftOf="@+id/black" android:background="#CD0000" android:minWidth="80dip" android:minHeight="80dip" tools:layout_editor_absoluteX="85dp" tools:layout_editor_absoluteY="410dp" /> <Button android:id="@+id/blue" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/green" android:layout_alignBottom="@+id/green" android:layout_toLeftOf="@+id/green" android:minWidth="80dip" android:minHeight="80dip" android:background="#00BFFF" tools:layout_editor_absoluteX="165dp" tools:layout_editor_absoluteY="410dp" /> <Button android:id="@+id/green" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/red" android:layout_alignBottom="@+id/red" android:layout_toRightOf="@+id/black" android:minWidth="80dip" android:minHeight="80dip" android:background="#00FF7F" tools:layout_editor_absoluteX="245dp" tools:layout_editor_absoluteY="410dp" /> </android.support.constraint.ConstraintLayout>