Be yourself; Everyone else is already taken.
— Oscar Wilde.
This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
Be yourself; Everyone else is already taken.
— Oscar Wilde.
This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
Membuat aplikasi di Moblie dengan login, untuk Sayarat untuk memenuhi ujian akhir semester mata kuliah Moblie Programing,Berikut ini langkah untuk membuat aplikasi menu minuman tradisional.

Pertama-tama kita membuat login terlebih dahulu, berikut di bawah ini.
package com.ilham;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class LoginActivity extends AppCompatActivity {
EditText mTextUsername;
EditText mTextPassword;
Button mButtonLogin;
TextView mTextViewREGISTER;
DatabaseHelper db;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
db = new DatabaseHelper(this);
mTextUsername = (EditText)findViewById(R.id.edittext_username);
mTextPassword = (EditText)findViewById(R.id.edittext_password);
mButtonLogin = (Button) findViewById(R.id.button_login);
mTextViewREGISTER = (TextView) findViewById(R.id.textview_register);
mTextViewREGISTER.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent registerIntent = new Intent(LoginActivity.this,RegisterActivity.class);
startActivity(registerIntent);
}
});
mButtonLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String user = mTextUsername.getText().toString().trim();
String pwd = mTextPassword.getText().toString().trim();
Boolean res = db.checkUser(user, pwd);
if (res == true)
{
Intent HomePage = new Intent(LoginActivity.this,MainActivity.class);
startActivity(HomePage);
}
else
Toast.makeText(LoginActivity.this, "Login Error", Toast.LENGTH_SHORT).show();
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
android:layout_gravity="center_horizontal"
android:background="@drawable/aura"
android:orientation="vertical"
tools:context="com.ilham.LoginActivity">
<EditText
android:id="@+id/edittext_username"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="250dp"
android:background="#ffffffff"
android:drawableLeft="@drawable/username"
android:hint="@string/username" />
<EditText
android:id="@+id/edittext_password"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:background="#ffffffff"
android:drawableLeft="@drawable/password"
android:hint="@string/password" />
<Button
android:id="@+id/button_login"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="40dp"
android:text="@string/login" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="35dp"
android:text="@string/not_registered"
android:textColor="#ffffffff" />
<TextView
android:id="@+id/textview_register"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:paddingLeft="10dp"
android:text="@string/register"
android:textColor="#ffffffff"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>

Lalau abis membuat login kita langsung memuat activity berkut nya adalah memuat register, berikut coding di bawah ini.
package com.ilham;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class RegisterActivity extends AppCompatActivity {
DatabaseHelper db;
EditText mTextUsername;
EditText mTextPassword;
EditText mTextCnfPassword;
Button mButtonRegister;
TextView mTextViewLogin;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
db = new DatabaseHelper(this);
mTextUsername = (EditText)findViewById(R.id.edittext_username);
mTextPassword = (EditText)findViewById(R.id.edittext_password);
mTextCnfPassword = (EditText)findViewById(R.id.edittext_cnf_password);
mButtonRegister = (Button) findViewById(R.id.button_register);
mTextViewLogin = (TextView) findViewById(R.id.textview_login);
mTextViewLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent LoginIntent = new Intent(RegisterActivity.this,LoginActivity.class);
startActivity(LoginIntent);
}
});
mButtonRegister.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String user = mTextUsername.getText().toString().trim();
String pwd = mTextPassword.getText().toString().trim();
String cnf_pwd = mTextCnfPassword.getText().toString().trim();
if (pwd.equals(cnf_pwd)) {
long val = db.addUser(user, pwd);
if (val > 0) {
Toast.makeText(RegisterActivity.this, "You have registered", Toast.LENGTH_SHORT).show();
Intent moveToLogin = new Intent(RegisterActivity.this, LoginActivity.class);
startActivity(moveToLogin);
} else {
Toast.makeText(RegisterActivity.this, "Restration Error", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(RegisterActivity.this, "Password is not matching", Toast.LENGTH_SHORT).show();
}
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="com.ilham.RegisterActivity"
android:orientation="vertical"
android:layout_gravity="center_horizontal"
android:background="#E91E63">
<EditText
android:id="@+id/edittext_username"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="250dp"
android:background="#ffffffff"
android:drawableLeft="@drawable/username"
android:hint="@string/username" />
<EditText
android:id="@+id/edittext_password"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:background="#ffffffff"
android:drawableLeft="@drawable/password"
android:hint="@string/password" />
<EditText
android:id="@+id/edittext_cnf_password"
android:layout_width="200dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:background="#ffffffff"
android:drawableLeft="@drawable/password"
android:hint="@string/confirm_password" />
<Button
android:id="@+id/button_register"
android:layout_width="200dp"
android:layout_height="50dp"
android:layout_gravity="center"
android:layout_marginTop="40dp"
android:text="@string/register" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_marginTop="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="35dp"
android:textColor="#ffffffff"
android:text="@string/already_registered"/>
<TextView
android:id="@+id/textview_login"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:textStyle="bold"
android:paddingLeft="10dp"
android:textColor="#ffffffff"
android:textSize="16sp"
android:text="@string/login"/>
</LinearLayout>
</LinearLayout>

Dan selanjut nya akan membuat listview di berikut nya.
package com.ilham;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
public class activity1 extends AppCompatActivity {
ListView LV;
String [] minuman={"Kunyit asam"," Beras kencur","Sinom","Wedang Secang","Wedang Jahe","Sarabba",
"Bandrek","Lahang","Bir Pletok","Es Cingcau","Wedang Uwuh"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity12);
LV = (ListView) findViewById(R.id.listView1);
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, minuman);
LV.setAdapter(adapter);
LV.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
int itemke = arg2;
String itemText = (String) LV.getItemAtPosition(arg2);
Toast.makeText(getBaseContext(), "Anda Meng Klik " + itemText, Toast.LENGTH_LONG).show();
if (itemText.equals("Kunyit asam")) {
Intent SeninIntent = new Intent(arg0.getContext(), kunyitasam.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Beras kencur")) {
Intent SeninIntent = new Intent(arg0.getContext(), beraskencur.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Sinom")) {
Intent SeninIntent = new Intent(arg0.getContext(), sinom.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Secang")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedangsecang.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Jahe")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedangjahe.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Sarabba")) {
Intent SeninIntent = new Intent(arg0.getContext(), sarabba.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Bandrek")) {
Intent SeninIntent = new Intent(arg0.getContext(), bandrek.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Lahang")) {
Intent SeninIntent = new Intent(arg0.getContext(), lahang.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Bir Pletok")) {
Intent SeninIntent = new Intent(arg0.getContext(), birpletok.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Es Cingcau")) {
Intent SeninIntent = new Intent(arg0.getContext(), escingcau.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Uwuh")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedanguwuh.class);
startActivityForResult(SeninIntent, 0);
}
}
});
}}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/holo_orange_light"
tools:context=".MainActivity" >
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
</ListView>
</LinearLayout>

package com.ilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class activity2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity22);
}
}
<?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"
android:background="@android:color/holo_orange_light"
tools:context=".activity2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="91dp"
android:layout_marginLeft="91dp"
android:layout_marginBottom="461dp"
android:text="Sejarah Minuman Khas Indonesia"
android:textColor="@android:color/background_dark" />
<TextView
android:layout_width="390dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginBottom="287dp"
android:text="Pada zaman dahulu jamu ini banyak diminum,dan diproduksi oleh para wanita,sebab pada masa itu pria lebih berperan untuk mencari tumbuhan herbal alami sebagai bahan dasar mengolah jamu.Umumnya jamu diminum sebagai obat alami untuk menjaga kesehatan,mencegah,serta dapat menyembuhkan berbagai macam penyakit.Jamu pun disajikan dengan berbagai jenis, karena di Indonesia sendiri tanaman herbal berjumlah cukup banyak" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginStart="119dp"
android:layout_marginLeft="119dp"
android:layout_marginBottom="226dp"
android:text="Manfaat jamu Tradisioal"
android:textColor="@android:color/background_dark" />
<TextView
android:layout_width="392dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="11dp"
android:layout_marginLeft="11dp"
android:layout_marginBottom="92dp"
android:text="Sejarah minuman jamu sendiri banyak dikonsumsi untuk menjaga kesehatan tubuh, baik didalam maupun luar agar tetap sehat dan prima. Terdapat banyak jenis jamu yang populer di Indonesia, diantaranya ialah jamu beras kencur, jamu pahitan, jamu sehat laki-laki dan wanita, jamu kunyit asam, dan aneka jamu lainnya." />
</RelativeLayout>

package com.ilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class activity3 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity32);
}
}
<?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"
android:background="@android:color/holo_orange_light"
tools:context=".activity3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="327dp"
android:text="Ujian UAS Mochamad Ilham Syaputra"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="62dp"
android:text="©copyright - 2020"/>
</RelativeLayout>

package com.ilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class kunyitasam extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.kunyitasam1);
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle("Kunyit Asam");
}
}
}
<?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=".kunyitasam">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_orange_light">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/kunyitasam1" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="32sp"
android:text="Kunyit Asam"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:lineSpacingMultiplier="1"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Bahan"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Kunyit,Asam Jawa,Air"
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Cara Buat"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="mencuci bersih kunyit,kupas dan haluskan,rebus bersama asam jawa,garam dan air secujkupnya.Rebus hingga air mendidih."
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Asal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Indonesia"
android:textColor="@android:color/black"/>
</TableRow>
</TableLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>

package com.ilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class sinom extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sinom1);
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle("Sinom");
}
}
}
<?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=".sinom">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_orange_light">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/sinom1" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="32sp"
android:text="Sinom"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:lineSpacingMultiplier="1"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Bahan"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Daun Asam Muda,Kunyit,Gula Merah,Air"
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Cara Buat"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="siapkan daun asam yang masih muda dan irisan kunyit,rebus dan tambahkan gula merah secukupnya."
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Asal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Indonesia"
android:textColor="@android:color/black"/>
</TableRow>
</TableLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>

<?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=".bandrek">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_orange_light">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/bandrek1" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="32sp"
android:text="Bandrek"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:lineSpacingMultiplier="1"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="tes"
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Bahan"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="jahe,gula aren,daun pandan,kayu manis,cengkeh,garam."
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Cara Buat"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="campur semuah bahan dan di sajikan sesuai takeran."
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Asal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Indonesia"
android:textColor="@android:color/black"/>
</TableRow>
</TableLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>

Ini hasil akihirnya seperti di gambar di atas. Kurang lebih saya mohon maaf dan terimakasih semoga bermanfaat dan membantu dalam tugas uas saya. Terima Kasih.
Mochamad Ilham Syaputra
161021450091
06TPLM001
Moblie Programing
Membuat aplikasi di Moblie untuk Sayarat untuk memenuhi ujian tengah semester mata kuliah Moblie Programing,Berikut ini langkah untuk membuat aplikasi menu minuman tradisional.

Pertama tama yang di buat depan halaman depan saat kita buka, Mengunakan boutton dan textview.
package android.utsilham;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button) findViewById(R.id.bt1);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openActivity1();
}
});
button = (Button) findViewById(R.id.bt2);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openActivity2();
}
});
button = (Button) findViewById(R.id.bt3);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
openActivity3();
}
});
}
public void openActivity1() {
Intent intent = new Intent(this, activity1.class);
startActivity(intent);
}
public void openActivity2() {
Intent intent = new Intent(this, activity2.class);
startActivity(intent);
}
public void openActivity3() {
Intent intent = new Intent(this, activity3.class);
startActivity(intent);
}
}
<?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"
android:background="@android:color/holo_orange_light"
tools:context=".MainActivity">
<TextView
android:layout_width="198dp"
android:layout_height="92dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerVertical="true"
android:layout_marginStart="85dp"
android:layout_marginLeft="85dp"
android:layout_marginTop="66dp"
android:text="Minuman-minuman Tradisiona Indonesia"
android:textColor="@android:color/holo_red_light"
android:textSize="20dp" />
<Button
android:id="@+id/bt1"
android:layout_width="277dp"
android:layout_height="65dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="49dp"
android:layout_marginLeft="49dp"
android:layout_marginTop="166dp"
android:background="@android:color/holo_red_light"
android:text="NAMA-NAMA MINUMAN" />
<Button
android:id="@+id/bt2"
android:layout_width="278dp"
android:layout_height="66dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="51dp"
android:layout_marginLeft="51dp"
android:layout_marginTop="303dp"
android:background="@android:color/holo_red_light"
android:text="SEJARAH MENUMAN TRADISIONAL" />
<Button
android:id="@+id/bt3"
android:layout_width="107dp"
android:layout_height="36dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="35dp"
android:layout_marginLeft="134dp"
android:layout_marginTop="421dp"
android:background="@android:color/holo_red_light"
android:text="ebout" />
</RelativeLayout>

Ini menampilkan button dan backgroud,harus di tambahkan new dreawle source file.
package android.utsilham;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.app.Activity;
import android.view.*;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import android.content.Intent;
public class activity1 extends AppCompatActivity {
ListView LV;
String [] minuman={"Kunyit asam"," Beras kencur","Sinom","Wedang Secang","Wedang Jahe","Sarabba",
"Bandrek","Lahang","Bir Pletok","Es Cingcau","Wedang Uwuh"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity12);
LV = (ListView) findViewById(R.id.listView1);
ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, minuman);
LV.setAdapter(adapter);
LV.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
int itemke = arg2;
String itemText = (String) LV.getItemAtPosition(arg2);
Toast.makeText(getBaseContext(), "Anda Meng Klik " + itemText, Toast.LENGTH_LONG).show();
if (itemText.equals("Kunyit asam")) {
Intent SeninIntent = new Intent(arg0.getContext(), kunyitasam.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Beras kencur")) {
Intent SeninIntent = new Intent(arg0.getContext(), beraskencur.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Sinom")) {
Intent SeninIntent = new Intent(arg0.getContext(), sinom.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Secang")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedangsecang.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Jahe")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedangjahe.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Sarabba")) {
Intent SeninIntent = new Intent(arg0.getContext(), sarabba.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Bandrek")) {
Intent SeninIntent = new Intent(arg0.getContext(), bandrek.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Lahang")) {
Intent SeninIntent = new Intent(arg0.getContext(), lahang.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Bir Pletok")) {
Intent SeninIntent = new Intent(arg0.getContext(), birpletok.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Es Cingcau")) {
Intent SeninIntent = new Intent(arg0.getContext(), escingcau.class);
startActivityForResult(SeninIntent, 0);
}
if (itemText.equals("Wedang Uwuh")) {
Intent SeninIntent = new Intent(arg0.getContext(), wedanguwuh.class);
startActivityForResult(SeninIntent, 0);
}
}
});
}}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/holo_orange_light"
tools:context=".MainActivity" >
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" >
</ListView>
</LinearLayout>

Selanjutnya perlu tambahkan activity baru kunyit asem komponen image,textview.
package android.utsilham;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class kunyitasam extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.kunyitasam1);
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle("Kunyit Asam");
}
}
}
<?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=".kunyitasam">
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_orange_light">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitXY"
android:src="@drawable/kunyitasam1" />
</FrameLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="32sp"
android:text="Kunyit Asam"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:lineSpacingMultiplier="1"
android:textColor="@android:color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Bahan"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Kunyit,Asam Jawa,Air"
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Cara Buat"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="mencuci bersih kunyit,kupas dan haluskan,rebus bersama asam jawa,garam dan air secujkupnya.Rebus hingga air mendidih."
android:textColor="@android:color/black"/>
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_marginRight="16dp"
android:text="Asal"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="14sp"
android:layout_weight="1"
android:text="Indonesia"
android:textColor="@android:color/black"/>
</TableRow>
</TableLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=""
android:textSize="12sp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>
Jangan lupa perlu menambahan gambar terlebih dahulu dalam folder draweble.

Lakukan hal yang sama untuk mengisi dari Activity atau minuman-minuman yang lain pada list view berikut hasil beberpa yang sudah di tambahpada list minuman tradisional.









Selanjutnya membuat list view berikut.
package android.utsilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class activity2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity22);
}
}
<?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"
android:background="@android:color/holo_orange_light"
tools:context=".activity2">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="91dp"
android:layout_marginLeft="91dp"
android:layout_marginBottom="461dp"
android:text="Sejarah Minuman Khas Indonesia"
android:textColor="@android:color/background_dark" />
<TextView
android:layout_width="390dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="12dp"
android:layout_marginLeft="12dp"
android:layout_marginBottom="287dp"
android:text="Pada zaman dahulu jamu ini banyak diminum,dan diproduksi oleh para wanita,sebab pada masa itu pria lebih berperan untuk mencari tumbuhan herbal alami sebagai bahan dasar mengolah jamu.Umumnya jamu diminum sebagai obat alami untuk menjaga kesehatan,mencegah,serta dapat menyembuhkan berbagai macam penyakit.Jamu pun disajikan dengan berbagai jenis, karena di Indonesia sendiri tanaman herbal berjumlah cukup banyak" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_marginStart="119dp"
android:layout_marginLeft="119dp"
android:layout_marginBottom="226dp"
android:text="Manfaat jamu Tradisioal"
android:textColor="@android:color/background_dark" />
<TextView
android:layout_width="392dp"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="11dp"
android:layout_marginLeft="11dp"
android:layout_marginBottom="92dp"
android:text="Sejarah minuman jamu sendiri banyak dikonsumsi untuk menjaga kesehatan tubuh, baik didalam maupun luar agar tetap sehat dan prima. Terdapat banyak jenis jamu yang populer di Indonesia, diantaranya ialah jamu beras kencur, jamu pahitan, jamu sehat laki-laki dan wanita, jamu kunyit asam, dan aneka jamu lainnya." />
</RelativeLayout>

Selanjut nya membuat list view yang nama nya di ebout,Berikut srip nya.
package android.utsilham;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class activity3 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity32);
}
}
<?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"
android:background="@android:color/holo_orange_light"
tools:context=".activity3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="327dp"
android:text="Ujian UTS Mochamad Ilham Syaputra"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="62dp"
android:text="©copyright - 2019"/>
</RelativeLayout>

Ini hasil akihirnya seperti di gambar di atas. Kurang lebih saya mohon maaf dan terimakasih semoga bermanfaat dan membantu dalam tugas uts saya. Terima Kasih.
Mochamad Ilham Syaputra
161021450091
06TPLM001
Moblie Programing
This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.
You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.
Why do this?
The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.
To help you get started, here are a few questions:
You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.
Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.
When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.