LAMPIRAN PROGRAM APLIKASI DESTINASI WISATA MEDAN BERBASIS ANDROID
1. Lampiran Program menu splash screen.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" android:background="@drawable/pesonaa" tools:context="com.example.sayangmama.wisatamedan.spscreen"> </RelativeLayout>
Lampiran Program menu splash screen.java package com.example.sayangmama.wisatamedan; import android.content.Intent; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager;
public class spscreen extends AppCompatActivity { //Set waktu lama splashscreen
private static int splashInterval = 2000;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.activity_spscreen);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Intent i = new Intent(spscreen.this, Home.class);
startActivity(i);
//jeda selesai Splashscreen
this.finish();
private void finish() {
// TODO Auto-generated method stub
}
}, splashInterval); };
}
2. Lampiran Program menu home .xml <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="#ffffff" tools:context="com.example.sayangmama.wisatamedan.Home"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_alignParentStart="true"> <ImageView android:layout_width="250dp" android:layout_height="197dp" android:layout_marginTop="40dp" android:layout_marginLeft="62dp" android:background="@drawable/pess" /> <ImageView android:id="@+id/imageView1" android:layout_width="150dp" android:layout_height="250dp" android:layout_marginTop="160dp" android:layout_marginLeft="30dp" android:onClick="cari" app:srcCompat="@drawable/wi" /> <ImageView android:id="@+id/imageView3" android:onClick="cafe" android:layout_width="150dp" android:layout_height="250dp" android:layout_marginTop="320dp" android:layout_marginLeft="30dp" app:srcCompat="@drawable/cafee" />
<ImageView android:id="@+id/imageView2" android:layout_width="150dp" android:layout_height="250dp" android:layout_marginLeft="190dp" android:layout_marginRight="60dp" android:layout_marginTop="160dp" android:onClick="cariOleOle" app:srcCompat="@drawable/ole" /> <ImageView android:id="@+id/imageView4" android:layout_width="150dp" android:layout_height="250dp" android:layout_marginLeft="190dp" android:layout_marginRight="30dp" android:layout_marginTop="320dp" android:onClick="about" app:srcCompat="@drawable/tentang" /> </FrameLayout> </ScrollView> </RelativeLayout>
Lampiran Program menu home .java package com.example.sayangmama.wisatamedan; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Home extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home); }
public void cari(View view){
Intent intent = new Intent(Home.this, cari.class); startActivity(intent);
}
public void cariOleOle(View view) {
Intent intent = new Intent(Home.this, cariOlehOleh.class); startActivity(intent);
}
public void cafe(View view) {
Intent intent = new Intent(Home.this, caricafe.class); startActivity(intent);
public void about(View view) {
Intent intent = new Intent(Home.this, about.class); startActivity(intent);
} }
3. Lampiran Program menu wisata .xml
<?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:background="#8efaa6" android:orientation="vertical" tools:context="com.example.sayangmama.wisatamedan.cari"> <ImageView android:layout_width="wrap_content" android:layout_height="200dp" android:background="@drawable/wisata"/> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <EditText android:id="@+id/kotakpencari" android:hint="Search.." android:layout_width="300dp" android:background="#f1eeee" android:layout_marginTop="20dp" android:layout_height="40dp" /> <ImageView android:layout_width="50sp" android:layout_height="40dp" android:layout_marginTop="20dp" android:layout_marginLeft="20dp" android:src="@drawable/aa"/> </TableRow> <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content"> </ListView> <TextView android:layout_width="match_parent" android:layout_height="70dp"
android:text="Tidak ditemukan , coba cari di google" android:onClick="carik"/>
</LinearLayout>
Lampiran Program
menu wisata.javapackage com.example.sayangmama.wisatamedan; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; import java.util.HashMap;
public class cari extends ListActivity {
//Aray list akan di simpan di dalam searchResults
ArrayList<HashMap<String, Object>> searchResults;
//ArrayList akan menyimpan data asli dari originalValues
ArrayList<HashMap<String, Object>> originalValues;
LayoutInflater inflater;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cari);
final EditText kotakpencari=(EditText) findViewById(R.id.kotakpencari);
ListView playersListView=(ListView) findViewById(android.R.id.list);
//mengambil LayoutInflater untuk inflating
thcustomView
//disini akan menggunakan custom adapter inflater=(LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE); //disini data aray akan di deklarasikan
//dan akan disimpan ke dalam Arraylist
//tipe data string untuk textview integer untuk gambar icon
String namabarangs[]={"mesjid raya","Istana
Maimun","Merddeka walk","Tjong a fie","Vihara maitreya","Penangkaran buaya asam kumbang","Taman candika","Medan zoo","Museum negeri"};
String hargabarangs[]={" "," "," "," "," "," "," "," "," "}; Integer[] icons ={R.drawable.raya,R.drawable.maimun,R.drawable.mwa,R.drawabl e.taf,R.drawable.maimun,R.drawable.ask,R.drawable.tcd,R.draw able.zoo,R.drawable.mnm}; originalValues=new ArrayList<HashMap<String,Object>>();
//hasmap akan menyimpan data sementara dalam
listview
HashMap<String , Object> temp;
//jumlah baris dalam ListView
int noOfPlayers=namabarangs.length;
//pengulangan dalam Arraylist
for(int i=0;i<noOfPlayers;i++)
{
temp=new HashMap<String, Object>(); temp.put("namabarang", namabarangs[i]); temp.put("hargabarang", hargabarangs[i]); temp.put("icon", icons[i]);
//menambah kan baris ke dalam ArrayList
originalValues.add(temp);
}
//searchResults sama dengan OriginalValues
searchResults=new
ArrayList<HashMap<String,Object>>(originalValues); //membuat adapter
//first param-the context
//second param-the id of the layout file //you will be using to fill a row
//third param-the set of values that //will populate the ListView
final CustomAdapter adapter=new CustomAdapter(this,
R.layout.activity_listitem,searchResults); //menset adapter di dalam listview
playersListView.setAdapter(adapter);
kotakpencari.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before, int count) {
//mengambil text di dalam EditText String searchString=kotakpencari.getText().toString(); int textLength=searchString.length(); searchResults.clear(); for(int i=0;i<originalValues.size();i++) { String playerName=originalValues.get(i).get("namabarang").toString( ); if(textLength<=playerName.length()){ //membandingkan data String didalam
EditText dengan namabarangs di dalam ArrayList if(searchString.equalsIgnoreCase(playerName.substring(0,text Length))) searchResults.add(originalValues.get(i)); }} adapter.notifyDataSetChanged(); }
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {} public void afterTextChanged(Editable s) {} });
}
//mendefinisikan custom adapter
private class CustomAdapter extends
ArrayAdapter<HashMap<String, Object>> {
public CustomAdapter(Context context, int textViewResourceId,
ArrayList<HashMap<String, Object>> Strings) {
super(context, textViewResourceId, Strings); }
//class untuk menyimpan baris konten (cacheview) di
listview
private class ViewHolder
{ ImageView icon; TextView namabarang,hargabarang; } ViewHolder viewHolder; @Override
public View getView(int position, View convertView, ViewGroup parent) {
{
convertView=inflater.inflate(R.layout.activity_listitem, null);
viewHolder=new ViewHolder(); //isi konten (cache the views)
viewHolder.icon=(ImageView) convertView.findViewById(R.id.icon); viewHolder.namabarang=(TextView) convertView.findViewById(R.id.namabarang); viewHolder.hargabarang=(TextView) convertView.findViewById(R.id.hargabarang);
//menghubungkan cached views ke dalam
convertview convertView.setTag(viewHolder); } else viewHolder=(ViewHolder) convertView.getTag(); int iconId=(Integer) searchResults.get(position).get("icon"); //menset data untuk ditampilkan
viewHolder.icon.setImageDrawable(getResources().getDrawable( iconId)); viewHolder.namabarang.setText(searchResults.get(position).ge t("namabarang").toString()); viewHolder.hargabarang.setText(searchResults.get(position).g et("hargabarang").toString());
//mengembalikan view untuk ditampilkan
return convertView;
} }
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position,
id);//menggunakan method onliistitemclick dan mencarinya
//berdasarkan posisi String str =
searchResults.get(position).get("namabarang").toString(); try {
if (str == "mesjid raya") {
Intent intent = new Intent(cari.this, Mesjidraya.class);
startActivity(intent); }
if (str == "Istana Maimun") {
Intent intent = new Intent(cari.this, Maimun.class);
startActivity(intent); }
if (str == "Merdeka walk") {
Mw.class);
startActivity(intent); }
if (str == "Tjong a fie") {
Intent intent = new Intent(cari.this, Tjong.class);
startActivity(intent); }
if (str == "Penangkaran buaya asam kumbang") { Intent intent = new Intent(cari.this, tbak.class);
startActivity(intent); }
if (str == "Vihara maitreya") {
Intent intent = new Intent(cari.this, Cemara.class);
startActivity(intent); }
if (str == "Museum negeri") {
Intent intent = new Intent(cari.this, mus.class); startActivity(intent); } } catch(Exception e){ e.printStackTrace(); } }
public void carik (View view) {
Intent intent = new Intent (cari.this,mepmasjid.class);
startActivity(intent); }
}
4. Lampiran Program menu oleh-oleh.xml
<?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:orientation="vertical" tools:context="com.example.sayangmama.wisatamedan.cariOlehOleh"> <ImageView android:layout_width="wrap_content" android:layout_height="200dp" android:background="@drawable/wisata"/>
<TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <EditText android:id="@+id/kotakpencari" android:hint="Search.." android:layout_width="300dp" android:background="#f1eeee" android:layout_marginTop="20dp" android:layout_height="40dp" /> <ImageView android:layout_width="50sp" android:layout_height="40dp" android:layout_marginTop="20dp" android:layout_marginLeft="20dp" android:src="@drawable/aa"/> </TableRow> <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content"> </ListView> <TextView android:layout_width="match_parent" android:layout_height="70dp"
android:text="Tidak ditemukan , coba cari di google" android:onClick="carik"/>
</LinearLayout>
Lampiran Program menu oleh-oleh.java package com.example.sayangmama.wisatamedan; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View;
import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; import java.util.HashMap;
public class cariOlehOleh extends ListActivity { //Aray list akan di simpan di dalam searchResults
ArrayList<HashMap<String, Object>> searchResults;
//ArrayList akan menyimpan data asli dari originalValues
ArrayList<HashMap<String, Object>> originalValues;
LayoutInflater inflater;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cari_oleh_oleh);
final EditText kotakpencari=(EditText) findViewById(R.id.kotakpencari);
ListView playersListView=(ListView) findViewById(android.R.id.list);
//mengambil LayoutInflater untuk inflating thcustomView
//disini akan menggunakan custom adapter inflater=(LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE); //disini data aray akan di deklarasikan
//dan akan disimpan ke dalam Arraylist
//tipe data string untuk textview integer untuk gambar icon
String namabarangs[]={"Bika ambon","Bolu meranti","pancake
durian","Marquisa","Medan napoleon","Teri medan"};
String hargabarangs[]={" "," "," "," "," "," "," "," "," "}; Integer[] icons ={R.drawable.bikaa,R.drawable.bomer,R.drawable.duriann,R.drawable. sirupmar,R.drawable.napp,R.drawable.trii}; originalValues=new ArrayList<HashMap<String,Object>>(); //hasmap akan menyimpan data sementara dalam listview
HashMap<String , Object> temp;
int noOfPlayers=namabarangs.length;
//pengulangan dalam Arraylist
for(int i=0;i<noOfPlayers;i++)
{
temp=new HashMap<String, Object>(); temp.put("namabarang", namabarangs[i]); temp.put("hargabarang", hargabarangs[i]); temp.put("icon", icons[i]);
//menambah kan baris ke dalam ArrayList
originalValues.add(temp);
}
//searchResults sama dengan OriginalValues
searchResults=new
ArrayList<HashMap<String,Object>>(originalValues); //membuat adapter
//first param-the context
//second param-the id of the layout file //you will be using to fill a row
//third param-the set of values that //will populate the ListView
final CustomAdapter adapter=new CustomAdapter(this,
R.layout.activity_listitem,searchResults); //menset adapter di dalam listview
playersListView.setAdapter(adapter);
kotakpencari.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) {
//mengambil text di dalam EditText
String searchString=kotakpencari.getText().toString(); int textLength=searchString.length(); searchResults.clear(); for(int i=0;i<originalValues.size();i++) { String playerName=originalValues.get(i).get("namabarang").toString(); if(textLength<=playerName.length()){
//membandingkan data String didalam
EditText dengan namabarangs di dalam ArrayList if(searchString.equalsIgnoreCase(playerName.substring(0,textLength ))) searchResults.add(originalValues.get(i)); }} adapter.notifyDataSetChanged(); }
public void beforeTextChanged(CharSequence s, int start, int count,
public void afterTextChanged(Editable s) {} });
}
//mendefinisikan custom adapter
private class CustomAdapter extends
ArrayAdapter<HashMap<String, Object>> {
public CustomAdapter(Context context, int textViewResourceId,
ArrayList<HashMap<String, Object>> Strings) {
super(context, textViewResourceId, Strings); }
//class untuk menyimpan baris konten (cacheview) di
listview
private class ViewHolder
{ ImageView icon; TextView namabarang,hargabarang; } ViewHolder viewHolder; @Override
public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null) { convertView=inflater.inflate(R.layout.activity_listitem, null); viewHolder=new ViewHolder();
//isi konten (cache the views)
viewHolder.icon=(ImageView) convertView.findViewById(R.id.icon); viewHolder.namabarang=(TextView) convertView.findViewById(R.id.namabarang); viewHolder.hargabarang=(TextView) convertView.findViewById(R.id.hargabarang);
//menghubungkan cached views ke dalam convertview
convertView.setTag(viewHolder); } else viewHolder=(ViewHolder) convertView.getTag(); int iconId=(Integer) searchResults.get(position).get("icon"); //menset data untuk ditampilkan
viewHolder.icon.setImageDrawable(getResources().getDrawable(iconId ));
abarang").toString());
viewHolder.hargabarang.setText(searchResults.get(position).get("ha rgabarang").toString());
//mengembalikan view untuk ditampilkan
return convertView;
} }
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);//menggunakan method onliistitemclick dan mencarinya
//berdasarkan posisi String str =
searchResults.get(position).get("namabarang").toString(); try {
if (str == "Bika ambon") {
Intent intent = new Intent(cariOlehOleh.this,bika .class);
startActivity(intent); }
if (str == "Bolu meranti") {
Intent intent = new Intent(cariOlehOleh.this, meranti.class);
startActivity(intent); }
if (str == "Pancake durian") {
Intent intent = new Intent(cariOlehOleh.this, pancakege.class);
startActivity(intent); }
if (str == "Marquisa") {
Intent intent = new Intent(cariOlehOleh.this, sm.class);
startActivity(intent); }
if (str == "Medan napoleon") {
Intent intent = new Intent(cariOlehOleh.this, napoleon.class);
startActivity(intent); }
if (str == "Teri medan") {
Intent intent = new Intent(cariOlehOleh.this, teri.class); startActivity(intent); } } catch(Exception e){ e.printStackTrace(); } }
{
Intent intent = new Intent (cariOlehOleh.this,mepmasjid.class); startActivity(intent);
} }
5.Lampiran Program menu cafe hits.xml
<?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:orientation="vertical" android:background="#eaa61e" tools:context="com.example.sayangmama.wisatamedan.caricafe"> <ImageView android:layout_width="wrap_content" android:layout_height="200dp" android:background="@drawable/wisata"/> <TableRow android:layout_width="wrap_content" android:layout_height="wrap_content"> <EditText android:id="@+id/kotakpencari" android:hint="Search.." android:layout_width="300dp" android:background="#f1eeee" android:layout_marginTop="20dp" android:layout_height="40dp" /> <ImageView android:layout_width="50sp" android:layout_height="40dp" android:layout_marginTop="20dp" android:layout_marginLeft="20dp" android:src="@drawable/aa"/> </TableRow> <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="wrap_content"> </ListView> <TextView android:layout_width="match_parent" android:layout_height="70dp"
android:text="Tidak ditemukan , coba cari di google" android:onClick="carik"/>
Lampiran Program menu cafe hits.java package com.example.sayangmama.wisatamedan; import android.app.ListActivity; import android.content.Context; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; import java.util.HashMap;
public class caricafe extends ListActivity {
//Aray list akan di simpan di dalam searchResults
ArrayList<HashMap<String, Object>> searchResults;
//ArrayList akan menyimpan data asli dari originalValues
ArrayList<HashMap<String, Object>> originalValues;
LayoutInflater inflater;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_caricafe);
final EditText kotakpencari=(EditText) findViewById(R.id.kotakpencari);
ListView playersListView=(ListView) findViewById(android.R.id.list);
//mengambil LayoutInflater untuk inflating thcustomView
//disini akan menggunakan custom adapter inflater=(LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE); //disini data aray akan di deklarasikan
//dan akan disimpan ke dalam Arraylist
//tipe data string untuk textview integer untuk gambar icon
bistro & lounge","sosmed cafe","laker urban ","sowe"}; String hargabarangs[]={" "," "," "," "," "," "," "," "," "}; Integer[] icons ={R.drawable.cafe1,R.drawable.cafe2,R.drawable.cafe3,R.drawable.ca fe4,R.drawable.cafe5,R.drawable.cafe6}; originalValues=new ArrayList<HashMap<String,Object>>(); //hasmap akan menyimpan data sementara dalam listview
HashMap<String , Object> temp;
//jumlah baris dalam ListView
int noOfPlayers=namabarangs.length;
//pengulangan dalam Arraylist
for(int i=0;i<noOfPlayers;i++)
{
temp=new HashMap<String, Object>(); temp.put("namabarang", namabarangs[i]); temp.put("hargabarang", hargabarangs[i]); temp.put("icon", icons[i]);
//menambah kan baris ke dalam ArrayList
originalValues.add(temp);
}
//searchResults sama dengan OriginalValues
searchResults=new
ArrayList<HashMap<String,Object>>(originalValues); //membuat adapter
//first param-the context
//second param-the id of the layout file //you will be using to fill a row
//third param-the set of values that //will populate the ListView
final CustomAdapter adapter=new CustomAdapter(this,
R.layout.activity_listitem,searchResults); //menset adapter di dalam listview
playersListView.setAdapter(adapter);
kotakpencari.addTextChangedListener(new TextWatcher() { public void onTextChanged(CharSequence s, int start, int before, int count) {
//mengambil text di dalam EditText
String searchString=kotakpencari.getText().toString(); int textLength=searchString.length(); searchResults.clear(); for(int i=0;i<originalValues.size();i++) { String playerName=originalValues.get(i).get("namabarang").toString(); if(textLength<=playerName.length()){
//membandingkan data String didalam
if(searchString.equalsIgnoreCase(playerName.substring(0,textLength ))) searchResults.add(originalValues.get(i)); }} adapter.notifyDataSetChanged(); }
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {} public void afterTextChanged(Editable s) {} });
}
//mendefinisikan custom adapter
private class CustomAdapter extends
ArrayAdapter<HashMap<String, Object>> {
public CustomAdapter(Context context, int textViewResourceId,
ArrayList<HashMap<String, Object>> Strings) {
super(context, textViewResourceId, Strings); }
//class untuk menyimpan baris konten (cacheview) di
listview
private class ViewHolder
{ ImageView icon; TextView namabarang,hargabarang; } ViewHolder viewHolder; @Override
public View getView(int position, View convertView, ViewGroup parent) { if(convertView==null) { convertView=inflater.inflate(R.layout.activity_listitem, null); viewHolder=new ViewHolder();
//isi konten (cache the views)
viewHolder.icon=(ImageView) convertView.findViewById(R.id.icon); viewHolder.namabarang=(TextView) convertView.findViewById(R.id.namabarang); viewHolder.hargabarang=(TextView) convertView.findViewById(R.id.hargabarang);
convertView.setTag(viewHolder); } else viewHolder=(ViewHolder) convertView.getTag(); int iconId=(Integer) searchResults.get(position).get("icon"); //menset data untuk ditampilkan
viewHolder.icon.setImageDrawable(getResources().getDrawable(iconId )); viewHolder.namabarang.setText(searchResults.get(position).get("nam abarang").toString()); viewHolder.hargabarang.setText(searchResults.get(position).get("ha rgabarang").toString());
//mengembalikan view untuk ditampilkan
return convertView;
} }
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);//menggunakan method onliistitemclick dan mencarinya
//berdasarkan posisi String str =
searchResults.get(position).get("namabarang").toString(); try {
if (str == "ichi dough") {
Intent intent = new Intent(caricafe.this,ichi .class);
startActivity(intent); }
if (str == "ismud park") {
Intent intent = new Intent(caricafe.this, ismudpark.class);
startActivity(intent); }
if (str == "sams bistro & lounge") {
Intent intent = new Intent(caricafe.this, sams.class);
startActivity(intent); }
if (str == "sosmed cafe") {
Intent intent = new Intent(caricafe.this, sosmedcafe.class);
startActivity(intent); }
if (str == "laker urban") {
Intent intent = new Intent(caricafe.this, laker.class);
startActivity(intent); }
if (str == "sowe restauran") {
Intent intent = new Intent(caricafe.this, sowe.class);
startActivity(intent); } } catch(Exception e){ e.printStackTrace(); }
6.Lampiran program menu tentang aplikasi.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="com.example.sayangmama.wisatamedan.about"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:layout_width="360dp" android:layout_height="617dp" android:background="@drawable/abot" /> </LinearLayout> </RelativeLayout>
Lampiran program menu tentang aplikasi.java package com.example.sayangmama.wisatamedan; import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
public class about extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about); }
}
7.Lampiran Program list wisata Lampiran program
<?xml version="1.0" encoding="utf-8"?>
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="#8efaa6" tools:context="com.example.sayangmama.wisatamedan.Mesjidraya"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentStart="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/editText4" android:layout_width="match_parent" android:layout_height="match_parent" android:ems="13" android:inputType="textPersonName"
android:text="Mesjid Raya Al-Mashun Medan" android:textSize="18dp" android:gravity="center" android:textStyle="bold" android:background="#fff0b3" /> <ImageView android:id="@+id/imageView17" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/raya"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView16" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginRight="100dp" android:onClick="gmaimun" app:srcCompat="@drawable/gambar" /> <ImageView android:id="@+id/imageView1"
android:layout_width="150dp" android:layout_height="100dp" android:layout_marginLeft="155dp" android:onClick="petamr" app:srcCompat="@drawable/mm" /> </FrameLayout> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Masjid Raya Medan atau Masjid Raya Al Mashun merupakan sebuah masjid yang terletak di Medan, Indonesia. Masjid ini dibangun pada tahun 1906 dan selesai pada tahun 1909. Pada awal pendiriannya, masjid ini menyatu dengan kompleks istana. Gaya arsitekturnya khas Timur Tengah, India dan Spanyol. Masjid ini berbentuk segi delapan dan memiliki sayap di bagian selatan, timur, utara dan barat. Masjid Raya Medan ini merupakan saksi sejarah kehebatan Suku Melayu sang pemilik dari Kesultanan Deli (Kota Medan)." /> <TextView android:id="@+id/textView5" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="Sejarah Pembangunan" android:layout_marginTop="30dp" android:textStyle="bold" /> <TextView android:id="@+id/textView6" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="32dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Sultan Ma’mun Al Rasyid Perkasa Alam sebagai pemimpin Kesultanan Deli memulai pembangunan Masjid Raya Al Mashun pada tanggal 21 Agustus 1906 (1 Rajab 1324 H).
Keseluruhan pembangunan rampung pada tanggal 10 September 1909 (25 Sya‘ban 1329 H) sekaligus digunakan yang ditandai dengan
pelaksanaan sholat Jum’at pertama di masjid ini. Keseluruhan pembangunannya menghabiskan dana sebesar satu juta Gulden. Sultan memang sengaja membangun masjid kerajaan ini dengan megah, karena menurut prinsipnya hal itu lebih utama ketimbang kemegahan
istananya sendiri, Istana Maimun. Pendanaan pembangunan masjid ini ditanggung sendiri oleh Sultan, namun konon Tjong A Fie, tokoh kota Medan dari etnis Tionghoa yang sezaman dengan Sultan Ma’mun Al Rasyid turut berkontribusi mendanai pembangunan masjid ini." /> <TextView
android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Arsitektural" android:layout_marginLeft="10dp" android:layout_marginTop="30dp" android:textStyle="bold" /> <TextView android:id="@+id/textView4" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Pada awalnya Masjid Raya Al Mashun dirancang oleh arsitek Belanda Van Erp yang juga merancang istana Maimun, namun kemudian prosesnya dikerjakan oleh JA Tingdeman. Van Erp ketika itu dipanggil ke pulau Jawa oleh pemerintah Hindia Belanda untuk bergabung dalam proses restorasi candi Borobudur di Jawa Tengah. Sebagian bahan bangunan diimpor antara lain: marmer untuk dekorasi diimpor dari Italia, Jerman dan kaca patri dari Cina dan lampu gantung langsung dari Perancis."
android:layout_marginTop="28dp" /> <TextView android:id="@+id/textView8" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="JA Tingdeman, sang arsitek merancang masjid ini dengan denah simetris segi delapan dalam corak bangunan campuran Maroko, Eropa dan Melayu dan Timur Tengah. Denah yang persegi delapan ini menghasilkan ruang bagian dalam yang unik tidak seperti masjid-masjid kebanyakan. Empat penjuru masjid masing-masing diberi beranda dengan atap tinggi berkubah warna hitam, melengkapi kubah utama di atap bangunan utama masjid. Masing-masing beranda dilengkapi dengan pintu utama dan tangga hubung antara pelataran dengan lantai utama masjid yang
ditinggikan, kecuali bangunan beranda di sisi mihrab.
Bangunan masjidnya terbagi menjadi ruang utama, tempat wudhu, gerbang masuk dan menara. Ruang utama, tempat sholat, berbentuk segi delapan tidak sama sisi. Pada sisi berhadapan lebih kecil, terdapat ‘beranda’ serambi kecil yang menempel dan menjorok keluar. Jendela-jendela yang mengelilingi pintu beranda terbuat dari kayu dengan kaca-kaca patri yang sangat berharga, sisa peninggalan Art Nouveau periode 1890-1914, yang dipadu dengan kesenian Islam. Seluruh ornamentasi di dalam masjid baik di dinding, plafon, tiang-tiang, dan permukaan lengkungan yang kaya dengan hiasan bunga dan tumbuh-tumbuhan. di depan masing-masing beranda terdapat tangga. Kemudian, segi delapan tadi, pada bagian luarnya tampil dengan empat gang pada keempat sisinya, yang
mengelilingi ruang sholat utama.
Gang-gang ini punya deretan jendela-jendela tidak berdaun yang berbentuk lengkungan-lengkungan yang berdiri di atas balok. Baik beranda maupun jendela-jendela lengkung itu mengingatkan desain
bangunan kerajaan-kerajaan Islam di Spanyol pada Abad Pertengahan. Sedangkan kubah masjid mengikuti model Turki, dengan bentuk yang patah-patah bersegi delapan. Kubah utama dikelilingi empat kubah lain di atas masing-masing beranda, dengan ukuran yang lebih kecil. Bentuk kubahnya mengingatkan kita pada Masjid Raya Banda Aceh. Di bagian dalam masjid, terdapat delapan pilar utama berdiameter 0,60 m yang menjulang tinggi untuk menyangga kubah utama pada bagian tengah. Adapun mihrab terbuat dari marmer dengan atap kubah runcing. Gerbang masjid ini berbentuk bujur sangkar beratap datar. Sedangkan menara masjid berhias paduan antara Mesir, Iran dan Arab."
/> "
</LinearLayout> </ScrollView>
</RelativeLayout>
Lampiran program masjid raya.java
package com.example.sayangmama.wisatamedan; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Mesjidraya extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mesjidraya); }
public void petamr(View view) {
Intent intent = new Intent(Mesjidraya.this, petamesjidraya.class);
startActivity(intent); }
public void gambarnext(View view) {
Intent intent = new Intent(Mesjidraya.this, gambarnext.class);
startActivity(intent); }
}
Lampiran program peta masjid raya
import android.support.v4.app.FragmentActivity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions;
public class petamesjidraya extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_petamr);
// Obtain the SupportMapFragment and get notified when the
map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
.findFragmentById(R.id.map); mapFragment.getMapAsync(this);
}
/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app. */
@Override
public void onMapReady(GoogleMap googleMap) { mMap = googleMap;
// Add a marker in Sydney and move the camera
LatLng sydney = new LatLng(3.5751117,98.6851323);
mMap.addMarker(new
MarkerOptions().position(sydney).title("Mesjid Raya Al- mashun "));
mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); CameraPosition cameraPosition = new
LatLng(3.5751117,98.6851323)).zoom(17).build(); mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPos ition)); } }
Lampiran program Istana Maimun.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" android:background="#8efaa6" tools:context="com.example.sayangmama.wisatamedan.Maimun"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/editText4" android:layout_width="match_parent" android:layout_height="match_parent" android:ems="13" android:inputType="textPersonName" android:text="Istana Maimun" android:textStyle="bold" android:textSize="18dp" android:gravity="center" android:background="#b1f7eb" /> <ImageView android:id="@+id/imageView17" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/maimun"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView android:id="@+id/imageView16" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginRight="100dp" android:onClick="gmaimun" app:srcCompat="@drawable/gambar" /> <ImageView android:id="@+id/imageView1" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginLeft="155dp" android:onClick="petamaimun" app:srcCompat="@drawable/mm" /> </FrameLayout> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp"
android:text="Alamat:Jalan Brigadir Jenderal Katamso, kelurahan " android:textStyle="bold"/> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textStyle="bold"
android:text=" Sukaraja, kecamatan Medan Maimun, Medan,"/>
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:textStyle="bold"
android:text=" Sumatera Utara" />
<TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:text="Sejarah Istana Maimun" android:layout_marginLeft="10dp" android:textStyle="bold" android:layout_marginTop="15dp" /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:gravity="left"
android:text="Istana Maimun, terkadang disebut juga Istana Putri Hijau, merupakan istana kebesaran Kerajaan Deli.
Istana ini didominasi warna kuning, warna kebesaran kerajaan
Melayu. Pembangunan istana selesai pada 25 Agustus 1888 M, di masa kekuasaan Sultan Makmun al-Rasyid Perkasa Alamsyah. Sultan Makmun adalah putra sulung Sultan Mahmud Perkasa Alam, pendiri kota Medan." /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Sejak tahun 1946, Istana ini dihuni oleh para ahli waris Kesultanan Deli. Dalam waktu-waktu tertentu, di istana ini sering diadakan pertunjukan musik tradisional Melayu. Biasanya, pertunjukan-pertunjukan tersebut dihelat dalam rangka memeriahkan pesta perkawinan dan kegiatan sukacita lainnya. Selain itu, dua kali dalam setahun, Sultan Deli biasanya mengadakan acara silaturahmi antar keluarga besar istana. Pada setiap malam Jumat, para keluarga sultan mengadakan acara rawatib adat (semacam
wiridan keluarga)." /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:text="Arsitektur" android:layout_marginLeft="10dp" android:textStyle="bold" android:layout_marginTop="15dp"/> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Arsitektur bangunan merupakan perpaduan antara ciri arsitektur Moghul, Timur Tengah, Spanyol, India,
Belanda dan Melayu. Pengaruh arsitektur Belanda tampak pada bentuk pintu dan jendela yang lebar dan tinggi. Tapi, terdapat beberapa pintu yang menunjukkan pengaruh Spanyol. Pengaruh Islam tampak pada keberadaaan lengkungan (arcade) pada atap. Tinggi lengkungan tersebut berkisar antara 5 sampai 8 meter. Bentuk lengkungan ini amat populer di kawasan Timur Tengah, India dan Turki"
/> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Bangunan istana terdiri dari tiga ruang utama, yaitu: bangunan induk, sayap kanan dan sayap kiri. Bangunan induk disebut juga Balairung dengan luas 412 m2, dimana singgasana kerajaan berada. Singgasana kerajaan digunakan dalam acara-acara tertentu, seperti penobatan raja, ataupun ketika menerima sembah sujud keluarga istana pada hari-hari besar Islam.Di bangunan ini juga terdapat sebuah lampu kristal besar bergaya Eropa."
/> <TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Di dalam istana terdapat 30 ruangan, dengan desain interior yang unik, perpaduan seni dari berbagai negeri. Dari luar, istana yang menghadap ke timur ini tampak seperti istana raja-raja Moghul."
/>
</LinearLayout> </ScrollView> </RelativeLayout>
Lampiran program Istana maimun.java
package com.example.sayangmama.wisatamedan; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Maimun extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maimun); }
public void gmaimun(View view) {
Intent intent = new Intent(Maimun.this, gmaimun.class);
startActivity(intent); }
public void petamaimun(View view) {
Intent intent = new Intent(Maimun.this, petamaimun.class);
startActivity(intent); }
}
Lampiran program peta lokasi Istana Maimun package com.example.sayangmama.wisatamedan;
import android.support.v4.app.FragmentActivity; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; public class petamaimun extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_petamr);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } /**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia. * If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) { mMap = googleMap;
// Add a marker in Sydney and move the camera LatLng sydney = new LatLng(3.5752,98.6839); mMap.addMarker(new
MarkerOptions().position(sydney).title("Istana Maimun ")); mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(3.5752,98.6839)).zoom(17).build(); mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cam eraPosition)); } }
Lampiran program menu wisata merdeka walk <?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="#8efaa6" tools:context="com.example.sayangmama.wisatamedan.Mw"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ImageView android:id="@+id/imageView17" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/mwa"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView16" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginRight="100dp" android:onClick="gmaimun" app:srcCompat="@drawable/gambar" /> <ImageView android:id="@+id/imageView1" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginLeft="155dp" android:onClick="petamw" app:srcCompat="@drawable/mm" /> </FrameLayout> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textStyle="bold" android:layout_marginLeft="10dp"
android:text=" Alamat : Jl. Balai Kota, Medan Barat, "/>
<TextView
android:layout_height="match_parent" android:textStyle="bold"
android:text=" Kota Medan, Sumatera Utara."/> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="15dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Merdeka Walk adalah sebuah pusat kuliner di Medan, ibukota Provinsi Sumatera Utara, Indonesia. Lokasinya di pusat kota Medan, di dalam Lapangan Merdeka. Tempat ini dikenal sebagai tempat nongkrong yang menyediakan pusat makanan, hiburan, hingga arena
pertunjukan. Merdeka Walk dibuka setiap hari Minggu hingga Jumat mulai pada pukul 11:00-00:00 dan Sabtu dari pukul 11:00-02:00." /> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
android:text="Sebagai pusat makanan, puluhan gerai makanan tersedia di sini. Mulai dari dari makanan Barat, makanan Asia sampai makanan khas Medan. Selain
menyediakan hidangan dalam berbagai menu, Merdeka Walk juga menyediakan satu spot yang nyaman dengan keasrian pepohonan bernama Center Piece. Tempat ini biasanya diisi berbagai hiburan seperti live music, acara untuk keluarga dan ajang kreativitas anak muda, seperti band performance, rap, breakers, dan hiburan lainnya di Center Piece."
/> </LinearLayout> </ScrollView>
</RelativeLayout>
Lampiran program menu wisata merdeka walk.java package com.example.sayangmama.wisatamedan; import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class Mw extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
}
public void petamw(View view) {
Intent intent = new Intent(Mw.this, petamw.class); startActivity(intent);
}
Lampiran program peta lokasi merdeka walk package com.example.sayangmama.wisatamedan; import android.support.v4.app.FragmentActivity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.CameraPosition; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; public class petamw extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_petamr);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } /**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera. In this case,
* we just add a marker near Sydney, Australia. * If Google Play services is not installed on the device, the user will be prompted to install
* it inside the SupportMapFragment. This method will only be triggered once the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) { mMap = googleMap;
// Add a marker in Sydney and move the camera LatLng sydney = new LatLng(3.5901502,98.6778752); mMap.addMarker(new
MarkerOptions().position(sydney).title("Merdeka walk ")); mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(3.5901502,98.6778752)).zoom(17).build(); mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cam eraPosition)); } }
Lampiran menu wisata penakaran buaya asam kumbang .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" android:background="#8efaa6" tools:context="com.example.sayangmama.wisatamedan.tbak"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView android:id="@+id/editText4" android:layout_width="match_parent" android:layout_height="match_parent" android:ems="13" android:inputType="textPersonName" android:text="Taman Buaya Asam Kumbang" android:textStyle="bold"
android:gravity="center" android:background="#fff0b3" /> <ImageView android:id="@+id/imageView17" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/ask"/> <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <ImageView android:id="@+id/imageView16" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginRight="100dp" android:onClick="gmaimun" app:srcCompat="@drawable/gambar" /> <ImageView android:id="@+id/imageView1" android:layout_width="150dp" android:layout_height="100dp" android:layout_marginLeft="155dp" android:onClick="petatbak" app:srcCompat="@drawable/mm" /> </FrameLayout> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:textStyle="bold"
android:text="Alamat : Jl. Bunga Raya II, Asam Kumbang, Medan Selayang
Kota Medan, Sumatera Utara"/> <TextView
android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="10dp"
android:text="Taman Buaya Asam Kumbang merupakan taman penangkaran reptil buaya terbesar di Indonesia. Taman yang memiliki luas dua hektar ini bahkan menjadi taman buaya terbesar di Asia Tenggara.Di sini ada sekitar dua ribu lima ratus buaya dengan berbagai ukuran, termasuk buaya yang telah berumur empat puluh tahun lebih." />
<TextView
android:layout_width="match_parent" android:layout_height="match_parent"
android:text="Taman Penangkaran Buaya Asam Kumbang yang didirikan oleh Lo Tham Muk ini sehari-hari banyak sekali dikunjungi para pelancong (traveler) dari berbagai penjuru. Terlebih-lebih pada akhir pekan dan musim liburan.
Akses lokasi mudah terjangkau dan harga tiket murah membuat Taman Penangkaran Buaya Asam Kumbang menjadi pilihan membawa keluarga dan teman untuk melihat buaya dalam berbagai
bentuk, ukuran, dan usia buaya.
Waktu pemberian makan buaya antara jam 5 sore. Ini adalah saat-saat yang ditunggu. Sedangkan harga tiket masuk Taman Penangkaran Buaya Asam Kumbang Rp. 6000/orang. Pembelian tiket berlangsung di sebuah kedai kecil bukan di loket karcis sebagaimana umumnya penjualan tiket.
Di kedai ini menjual juga makanan dan minuman ringan serta aksesoris bermotif buaya. Pada dinding-dindingnya tampak hiasan/kliping/figura foto-foto liputan media tentang Taman Penangkaran Buaya Asam Kumbang."
/> <TextView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="8dp" android:textStyle="bold"
android:text="Taman ini buka setiap hari dari pukul 09.00 – 18.00 WIB."/>
</LinearLayout> </ScrollView>
</RelativeLayout>
Lampiran program menu wisata penakaran buaya asam kumbang .java package com.example.sayangmama.wisatamedan;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity; import android.os.Bundle;
import android.view.View;
public class tbak extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tbak);
}
public void petatbak(View view) {
Intent intent = new Intent(tbak.this, petatbak.class);