Как разместить EditText и Button рядом друг с другом?

Я хочу попытаться расположить EditText и Button рядом друг с другом. В настоящее время у меня есть кнопка справа, а текст редактирования выровнен по левому краю, но затем кнопка показывает, что она находится поверх EditText. Я хочу, чтобы кнопка начиналась там, где заканчивается EditText.

Это то, что у меня есть прямо сейчас:

<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>

Я пытался настроить ее, задав ширину EditText с точным значением dp, но затем, когда экран переворачивается горизонтально большой разрыв между EditText и Button.

9
задан Yenthe 9 February 2015 в 10:51
поделиться