Skip to content

Instantly share code, notes, and snippets.

@susantokun
Last active May 7, 2020 19:34
Show Gist options
  • Save susantokun/f6f1b6674cdff5dffa9623a5bb396491 to your computer and use it in GitHub Desktop.
Save susantokun/f6f1b6674cdff5dffa9623a5bb396491 to your computer and use it in GitHub Desktop.
Form Mahasiswa di Android Studio
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#e7e">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:text="BAGIAN HEADER"
android:textAlignment="center"
android:textColor="#fff"
android:textStyle="bold" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="NPM\t\t:" />
<EditText
android:id="@+id/isinpm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Masukan NPM" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Nama\t\t:" />
<EditText
android:id="@+id/isinama"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Masukan Nama" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Jenis Kelamin\t:" />
<RadioGroup
android:layout_width="match_parent"
android:id="@+id/jk"
android:layout_height="wrap_content">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Laki - laki" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Perempuan" />
</RadioGroup>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Kelas\t\t\t\t\t\t:" />
<Spinner
android:id="@+id/kelas"
android:entries="@+array/pilihkelas"
android:layout_width="match_parent"
android:layout_height="wrap_content"></Spinner>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Agama\t\t\t\t\t:" />
<Spinner
android:id="@+id/agama"
android:entries="@+array/pilihagama"
android:layout_width="match_parent"
android:layout_height="wrap_content"></Spinner>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tempat Lahir\t:" />
<EditText
android:id="@+id/tempatlahir"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:hint="Masukan Tempat Lahir" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tanggal Lahir\t:" />
<EditText
android:id="@+id/tanggallahir"
android:layout_width="wrap_content"
android:text=""
android:layout_height="wrap_content"
android:hint="dd/MM/yyyy" />
<Button
android:id="@+id/simpan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SIMPAN" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="===== HASIL INPUT ====="
android:textAlignment="center" />
<TextView
android:id="@+id/hasil"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""/>
</LinearLayout>
</ScrollView>
</LinearLayout>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment