I am facing hardtime with linear layout, in my linear layout i have two images these images are in opposite ends, but when iam changing the screen orientation the cancel button is comming in the middle
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/askabud" />
<ImageView
android:id="@+id/fbcancel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="200dp"
android:src="@drawable/fbcancel" />
<Spinner
android:id="@+id/quesspinner"
android:layout_width="50dp"
android:layout_height="30dp"
android:drawSelectorOnTop="true"
android:entries="@array/fblist"
android:visibility="gone" />
</LinearLayout>
not sure where iam going wrong. Any help is appreciated.
here is my complete xml file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#FFFFFF" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/askabud" />
<ImageView
android:id="@+id/fbcancel"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="200dp"
android:src="@drawable/fbcancel" />
<Spinner
android:id="@+id/quesspinner"
android:layout_width="50dp"
android:layout_height="30dp"
android:drawSelectorOnTop="true"
android:entries="@array/fblist"
android:visibility="gone" />
</LinearLayout>
<View
android:layout_width="wrap_content"
android:layout_height="0.7dip"
android:background="#3b5998" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="165dp"
android:orientation="horizontal" >
<ImageView
android:id="@+id/autodelete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignRight="@+id/fbshare"
android:src="@drawable/autodelete" />
<Spinner
android:id="@+id/spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/autodelete"
android:layout_alignTop="@+id/autodelete"
android:visibility="gone"
android:entries="@array/fblist" />
<EditText
android:id="@+id/fbedittext"
android:layout_width="wrap_content"
android:layout_height="135dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="16dp"
android:layout_toLeftOf="@+id/fbshare"
android:background="@drawable/roundcorners"
android:ems="10"
android:hint="@string/fbhint"
android:windowSoftInputMode="stateHidden"
android:textSize="14sp" />
<ImageView
android:id="@+id/fbshare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/fbedittext"
android:layout_marginRight="15dp"
android:layout_marginLeft="5dp"
android:paddingRight="5dp"
android:src="@drawable/newfb1" />
<ImageView
android:id="@+id/fbpeople"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/autodelete"
android:layout_alignLeft="@+id/fbshare"
android:layout_marginBottom="18dp"
android:src="@drawable/people2" />
</RelativeLayout>
<TextView
android:id="@+id/placeName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:paddingTop="15dp"
android:paddingLeft="10dp"
android:textColor="#000000"
android:textStyle="bold" />
<TextView
android:id="@+id/placeAddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:paddingTop="10dp"
android:paddingLeft="10dp"
android:textColor="#000000"
android:textStyle="bold" />
<TextView
android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="5dp"
android:text="@string/fbtext"
android:textColor="#000000"
android:paddingLeft="10dp"
android:paddingBottom="10dp" />
</LinearLayout>