I want to try to get EditText and Button next to each other. I currently have a button on the right, and the edit text is left-aligned, and then the button shows that it is on top of the EditText. I want the start button where the EditText ends.
Here is what I have right now:
<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="#004D79"> <RelativeLayout android:id="@+id/relativeLayout1" android:layout_height="wrap_content" android:layout_width="wrap_content"> <EditText android:layout_alignParentLeft="true" android:text="EditText" android:layout_marginTop="10dp" android:id="@+id/editText" android:layout_height="wrap_content" android:layout_width="fill_parent"> </EditText> <Button android:text="Skip" android:id="@+id/skipButton" android:textSize="18sp" android:layout_marginTop="10dp" android:layout_alignParentRight="true" android:layout_height="wrap_content" android:layout_width="80dp"> </Button> </RelativeLayout> </LinearLayout>
I tried adjusting it using the width of the EditText with the exact amount of dp, but then when the screen rotates horizontally, there is a big gap between the EditText and Button.
Kevin
source share