Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_gravity="top"
tools:context=".MainActivity">
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_marginStart="0dp"
android:layout_marginLeft="0dp"
android:layout_marginTop="0dp"
android:layout_marginEnd="0dp"
android:layout_marginRight="0dp" />
<Button
android:id="@+id/buttonStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:onClick="onClickStart"
android:text="Begin" />
<Button
android:id="@+id/buttonSend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText"
android:layout_toEndOf="@+id/buttonStart"
android:layout_toRightOf="@+id/buttonStart"
android:onClick="onClickSend"
android:text="Send" />
<TextView
android:id="@+id/textView"
android:layout_width="50dp"
android:layout_height="100dp"
android:layout_below="@+id/buttonSend"
android:layout_alignEnd="@+id/editText"
android:layout_alignRight="@+id/editText"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true" />
<Button
android:id="@+id/buttonStop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText"
android:layout_toEndOf="@+id/buttonSend"
android:layout_toRightOf="@+id/buttonSend"
android:onClick="onClickStop"
android:text="Stop" />
<Button
android:id="@+id/buttonClear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/editText"
android:layout_toEndOf="@+id/buttonStop"
android:layout_toRightOf="@+id/buttonStop"
android:onClick="onClickClear"
android:text="Clear" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.