Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created September 20, 2020 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/6ead60a3957b938f569b953e12bf163c to your computer and use it in GitHub Desktop.
Save codingwithsara/6ead60a3957b938f569b953e12bf163c to your computer and use it in GitHub Desktop.
Java (Android Studio) Tutorial – QuickMail –
<?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"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="codingwithsara.com.quickmail.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="To:"
android:textSize="18sp"/>
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:id="@+id/radioGroup1">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Mom"
android:checked="true"
android:id="@+id/one"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Boss"
android:id="@+id/two"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Friend"
android:id="@+id/three"/>
</RadioGroup>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Message"
android:layout_marginTop="30dp"
android:textSize="18sp"/>
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:id="@+id/radioGroup2">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I got it!"
android:checked="true"
android:id="@+id/message1"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pick me up!"
android:id="@+id/message2"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Sorry, I'm late..."
android:id="@+id/message3"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="I understand."
android:id="@+id/message4"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Call me:)"
android:id="@+id/message5"/>
</RadioGroup>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="send"
android:layout_marginTop="30dp"
android:layout_gravity="center"
android:onClick="sendMessage"/>
</LinearLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment