LinearLayout
is not the right approach here. What you want is a RelativeLaout
with the image on the left, the delete button on the right and the text in the middle - something like this:
<RelativeLayout
android:id="@+id/photoslayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/lightSeperator"
android:orientation="vertical" >
<ImageView
android:id="@+id/photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:visibility="visible" />
<ImageButton
android:id="@+id/delete_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/delete_button_bg" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/photo"
android:layout_toLeftOf="@id/delete_pic" />
</RelativeLayout>