Professional Documents
Culture Documents
OLEH :
STMIK DIPANEGARA
MAKASSAR
2020
Output
MainActivity.Xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Masukkan Nama"
android:inputType="textPersonName"
android:textColor="#000000"
android:textColorHint="#000000" />
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Masukkan NIM"
android:inputType="textPersonName"
android:textColor="#000000"
android:textColorHint="#000000" />
<EditText
android:id="@+id/editText3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Masukkan Kelas"
android:inputType="textPersonName"
android:textColor="#000000"
android:textColorHint="#000000" />
<MultiAutoCompleteTextView
android:id="@+id/simpleMultiAutoCompleteTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Masukkan Jurusan"
android:padding="10dp"
android:textColor="#f00"
android:textColorHint="#000000"
android:textSize="18sp" />
<EditText
android:id="@+id/editText4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="Masukkan Email"
android:inputType="textPersonName"
android:textColorHint="#000000" />
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:text="submit" />
</LinearLayout>
</RelativeLayout>
MainActivity. Java
package com.example.finalprakatyadwiyulianti17117;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.MultiAutoCompleteTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
MultiAutoCompleteTextView simpleMultiAutoCompleteTextView =
(MultiAutoCompleteTextView)findViewById(R.id.simpleMultiAutoCompleteTextView);
simpleMultiAutoCompleteTextView.setThreshold(1);
simpleMultiAutoCompleteTextView.setTokenizer(new
MultiAutoCompleteTextView.CommaTokenizer());
}
}