I am working on piano app and I am facing some problems with the layout creation. I want to create a layout like below:
But I am able to create only this
Now I want to add all the black buttons but problem is that I am not able to add view above those buttons. How can I do this? My current layout code is below, please suggest me how can I achieve this. Now I am able to click all the buttons, once I add all the buttons then each button should be clickable.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:weightSum="1.5" >
<ImageView
android:id="@+id/bw1"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw2"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw3"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw4"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw5"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw6"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw7"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw8"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw9"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw10"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw11"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw12"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw13"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw14"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
<ImageView
android:id="@+id/bw15"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight=".1"
android:background="@drawable/blacknew" />
</LinearLayout>
</RelativeLayout>