I know there are questions like this but most the time it seems their problem is they didn’t align the Layouts as fill parent. Well I did so I am not sure why my buttons still won’t do it. Could it be because of all the layouts I use?
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/face">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="100dp" android:gravity="center">
<ImageView android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:id="@+id/eyes" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/eyes1" />
<LinearLayout android:layout_marginTop="50dp" android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="horizontal">
<Button android:id="@+id/eyesback" android:layout_width="50dp" android:layout_height="50dp" />
<Button android:id="@+id/eyesforward" android:layout_height="50dp" android:layout_width="50dp" android:layout_gravity="right"></Button>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
Its probably something simple I missed too. Thanks for any help.
try this one
I have simply change teh LinearLayout into Relative layout and set properties to one button to get alighted left another one to right.