Complex Sample with RelativeLayout


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/textview1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="1. eeeEingabe"
        android:layout_marginTop="20dp"
        />
    <EditText
        android:id="@+id/tInput1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:lines="1"
        android:text="25678"
        android:layout_toRightOf="@id/textview1"
        android:layout_alignBaseline="@id/textview1"
        />

    <TextView
        android:id="@+id/textview2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="2. Eingabe"
        android:layout_marginTop="20dp"
        android:layout_below="@id/textview1"
        />
    <EditText
        android:id="@+id/tInput2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:lines="1"
        android:text="123"
        android:layout_toRightOf="@id/textview1"
        android:layout_alignBaseline="@id/textview2"
        />


    <LinearLayout
        android:id="@+id/panelButton"
        android:orientation="horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="25dp"
        android:layout_below="@id/textview2"
        android:layout_centerHorizontal="true"
        >

        <Button
            android:id="@+id/bnOK"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:text="Ok"
            android:layout_alignParentStart="true"
            />
        <Button
            android:id="@+id/bnCancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Cancel"
            />


    </LinearLayout >

    <Button
        android:id="@+id/bnTest"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

        android:text="Test"
        android:layout_below="@id/panelButton"
        />

</RelativeLayout>