I am trying to align my buttons so they are all aligned with each other side by side, but for some reason the next button shows up on the linear below. I must use linear layout for this.
This is what I got:
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="top|left"
android:background="@drawable/pic_icon"
android:id="@+id/picButton"
android:layout_gravity="left"/>
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="top|center"
android:background="@drawable/cancel_pic"
android:id="@+id/deletePicButton"
android:layout_gravity="center"/>
Updated code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:background="#000000"
tools:context=".Visualizer"
android:id="@+id/homePage">
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="top|left"
android:background="@drawable/pic_icon"
android:id="@+id/picButton"
android:layout_gravity="left"/>
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="top|center"
android:background="@drawable/cancel_that_pic"
android:id="@+id/deletePicButton"
/>
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:gravity="top|right"
android:background="@drawable/visual_blueblue"
android:id="@+id/visIcon"
android:layout_gravity="right"
/>
<ListView
android:id="@+id/song_list"
android:layout_width="fill_parent"
android:layout_height="500dp" >
</ListView>
<Space
android:id="@+id/blank_space"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal" />