DAFTAR PUSTAKA
Arifianto, Teguh. 2011. Membuat Interface Aplikasi Android Lebih Keren dengan LWIT. Yogyakarta: Penerbit Andi. Fling, B. 2009. Mobile Design and Development: Practical Concepts and Techniques for Creating Mobile Sites and Web Apps. California: O'Reilly . Hamer, Carol dan Andrew Davison. Learn Blackberry Games Development. New York: APress. Kustiyahningsih,Yeni. 2011. “Pemrograman Basis Data Berbasis Web Menggunakan PHP & MySQL”. Jakarta: Graha Ilmu. Mulyanto, Agus. 2009. Sistem Informasi Konsep & Aplikasi. Yogyakarta: Pustaka Pelajar. Nazruddin, H Safaat. 2011. ANDROID (Pemrograman Aplikasi Mobile Smartphone danTablet PC Berbasis Android). Bandung: Informatika. Stephanus, Hermawan. 2011. Mudah Membuat Aplikasi Android. Yogyakarta: Penerbit Andi. Sutopo, Ariesto Hadi. 2012. Teknologi Informasi dan Komunikasi dalam Pendidikan. Yogyakarta: Graha Ilmu.
33
LAMPIRAN
Source code MainActivity.java package com.prasetyo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; public class MainActivity extends Activity { String judulbab; String[] utama = new String[] { "Bab 1 Thaharah", "Bab 2 Shalat", "Bab 3 Jenazah", "Bab 4 Zakat", "Bab 5 Shaum", "Bab 6 Haji", "Bab 7 Jual Beli", "Bab 8 Nikah", "Bab 9 Urusan Pidana", "Bab 10 Hukuman", "Bab 11 Jihad", "Bab 12 Makanan", "Bab 13 Sumpah dan Nazar", "Bab 14 Memutuskan Perkara", "Bab 15 Memerdekakan Budak", "Bab 16 Kelengkapan" }; String[] bab01 = new String[] { "Air", "Bejana", "Najis dan Cara Menghilangkannya", "Wudlu", "Mengusap Dua Khuff", "Perkara yang Membatalkan Wudlu", "Tata Cara Buang Hajat", "Mandi dan Hukum Junub", "Tayammum", "Haidl" }; String[] bab02 = new String[] { "Waktu Shalat", "Adzan", "Syarat Shalat", "Sutra Bagi Orang yang Shalat", "Anjuran Khusyu Dalam Shalat", "Mesjid", "Sifat Shalat", "Sujud Sahwi dan yang Lainnya", "Shalat Thathawwu", "Shalat Berjamaah dan Imam", "Shalat bagi Musafir dan yang Sakit", "Shalat Jumat", "Shalat Khauf", "Shalat Dua Hari Raya", "Shalat Gerhana", "Shalat Istisqa", "Pakaian" }; String[] bab03 = new String[] { "Jenazah" }; String[] bab04 = new String[] { "Zakat", "Zakat Fitrah", "Shadaqah Thathawwu", "Pembagian Shadaqah" }; String[] bab05 = new String[] { "Shaum", "Shaum Sunnah dan Shaum yang Dilarang", "Itikaf dan Ibadah Ramadhan" }; String[] bab06 = new String[] { "Keutamaan Haji dan yang Berkewajiban Haji", "Miqat", "Wajib Ihram dan Sifatnya", "Ihram dan Lainnya", "Sifat Haji dan Masuk Kota Mekkah",
34
"Terlambat dan Terhalangnya Haji" }; String[] bab07 = new String[] { "Syarat dan yang Dilarang DIperjualbelikan", "Khiyar", "Riba", "Rukhshah Menjual Buah-Buahan", "Salam Qiradh dan Gadai", "Taflis dan Hajr", "Perdamaian", "Memindahkan Hutang dan Menanggung", "Syirkah dan Wakalah", "Iqrar", "Ariyah", "Ghashab", "Syufah", "Qiradh", "Musaqah dan Ijarah", "Menghidupkan Tanah yang Mati", "Waqaf", "Hibah Umra dan Ruqba", "Barang Temuan", "Faraidl", "Wasiat", "Barang Titipan" }; String[] bab08 = new String[] { "Nikah", "Pergaulan Dengan Isteri", "Kafaah dan Khiyar", "Maskawin", "Walimah", "Pembagian Giliran", "Khulu", "Thalaq", "Rujuk", "Ila Zihar dan Kafarat", "Sumpah Lian", "Iddah dan Ihdad", "Penyusuan", "Nafaqah" }; String[] bab09 = new String[] { "Pidana", "Denda", "Menuntut Darah dan Sumpah", "Memerangi Para Pemberontak", "Memerangi Para Penjahat dan Membunuh Orang Murtad" }; String[] bab10 = new String[] { "Hukuman Pelaku Zina", "Hukuman Menuduh", "Hukum Pencurian", "Hukuman Bagi Peminum dan Penjelasan Tentang Minuman yang memabukkan", "Tazir dan Hukum Penjahat" }; String[] bab11 = new String[] { "Jihad", "Upeti dan Gencatan Senjata", "Berlomba dan Memanah" }; String[] bab12 = new String[] { "Makanan", "Binatang Buruan dan Sembelihan", "Kurban", "Aqiqah" }; String[] bab13 = new String[] { "Sumpah dan Nazar" }; String[] bab14 = new String[] { "Memutuskan Perkara", "Persaksian", "Dakwa dan Bukti" }; String[] bab15 = new String[] { "Memerdekakan Budak", "Mudabbar Mukatab dan Ummul Walad" }; String[] bab16 = new String[] { "Adab", "Kebaikan dan Silaturahmi", "Zuhud dan Wara", "Peringatan untuk Menghindari Kejelekan Akhlak", "Mendorong untuk Melakukan Kebaikan", "Dzikir dan Doa" }; ArrayAdapter<String> adapter; ListView lv_bab = null; EditText inputSearch; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); inputSearch = (EditText) findViewById(R.id.inputSearch); lv_bab = (ListView) findViewById(R.id.lv_bab); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, utama);
35
lv_bab.setAdapter(adapter); lv_bab.setOnItemClickListener(onItem); inputSearch.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence cs, int arg1, int arg2, int arg3) { adapter.getFilter().filter(cs); } @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub } }); } AdapterView.OnItemClickListener onItem = new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView> arg0, View arg1, int position, long arg3) { // TODO Auto-generated method stub Object o = adapter.getItem(position); String pilihan = o.toString(); String temp = pilihan.toLowerCase(); String[] artemp = temp.split(" "); if (artemp[0].equals("bab")) { judulbab = pilihan; } if (pilihan.equals("Bab 1 Thaharah")) { Bab01(); } else if (pilihan.equals("Bab 2 Shalat")) { Bab02(); } else if (pilihan.equals("Bab 3 Jenazah")) { Bab03(); } else if (pilihan.equals("Bab 4 Zakat")) { Bab04(); } else if (pilihan.equals("Bab 5 Shaum")) { Bab05(); } else if (pilihan.equals("Bab 6 Haji")) { Bab06(); } else if (pilihan.equals("Bab 7 Jual Beli")) { Bab07(); } else if (pilihan.equals("Bab 8 Nikah")) {
36
Bab08(); } else if (pilihan.equals("Bab 9 Urusan Pidana")) { Bab09(); } else if (pilihan.equals("Bab 10 Hukuman")) { Bab10(); } else if (pilihan.equals("Bab 11 Jihad")) { Bab11(); } else if (pilihan.equals("Bab 12 Makanan")) { Bab12(); } else if (pilihan.equals("Bab 13 Sumpah dan Nazar")) { Bab13(); } else if (pilihan.equals("Bab 14 Memutuskan Perkara")) { Bab14(); } else if (pilihan.equals("Bab 15 Memerdekakan Budak")) { Bab15(); } else if (pilihan.equals("Bab 16 Kelengkapan")) { Bab16(); } else { tampilkanPilihan(pilihan, position); } } }; public void Bab01() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab01); lv_bab.setAdapter(adapter); } public void Bab02() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab02); lv_bab.setAdapter(adapter); } public void Bab03() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab03); lv_bab.setAdapter(adapter); } public void Bab04() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab04); lv_bab.setAdapter(adapter); } public void Bab05() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab05); lv_bab.setAdapter(adapter); } public void Bab06() {
37
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab06); lv_bab.setAdapter(adapter); } public void Bab07() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab07); lv_bab.setAdapter(adapter); } public void Bab08() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab08); lv_bab.setAdapter(adapter); } public void Bab09() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab09); lv_bab.setAdapter(adapter); } public void Bab10() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab10); lv_bab.setAdapter(adapter); } public void Bab11() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab11); lv_bab.setAdapter(adapter); } public void Bab12() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab12); lv_bab.setAdapter(adapter); } public void Bab13() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab13); lv_bab.setAdapter(adapter); } public void Bab14() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab14); lv_bab.setAdapter(adapter); } public void Bab15() {
38
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab15); lv_bab.setAdapter(adapter); } public void Bab16() { adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, bab16); lv_bab.setAdapter(adapter); } protected void onListItemClick(ListView l, View v, int position, long id) { } public void tampilkanPilihan(String pilihan, int position) { // Toast.makeText(this, "Membuka tentang " + pilihan + ": " + // String.valueOf(position), Toast.LENGTH_LONG).show(); Intent in = new Intent(MainActivity.this, ViewActivity.class); in.putExtra("judulbab", judulbab); in.putExtra("teks", pilihan); startActivity(in); } AdapterView.OnItemClickListener onMenu = new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Intent in = new Intent(MainActivity.this, ViewActivity.class); startActivity(in); } }; @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.layout.menu, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_back: Intent i = new Intent(this, MainActivity.class); startActivity(i); return false; case R.id.menu_tentang: Intent t = new Intent(MainActivity.this, TentangActivity.class); startActivity(t);
39
return false; case R.id.menu_keluar: this.finish(); return false; default: return super.onOptionsItemSelected(item); } }; }
Source code ViewActivity.java package com.prasetyo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.webkit.WebView; public class ViewActivity extends Activity { WebView wv; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub String teks, judulbab, alamat; Intent in = this.getIntent(); teks = in.getStringExtra("teks").toLowerCase(); String[] parse = teks.split(" "); String judulgabung = ""; for (int i = 0; i < parse.length; i++) { judulgabung += parse[i]; } judulbab = in.getStringExtra("judulbab").toLowerCase(); String[] parsebab = judulbab.split(" "); String babjudul = ""; for (int j = 0; j < parsebab.length; j++) { babjudul += parsebab[j]; } super.onCreate(savedInstanceState); setContentView(R.layout.view); wv = (WebView) findViewById(R.id.webView1); wv.getSettings().setJavaScriptEnabled(true);
40
String awal = "file:///android_asset/isi/"; alamat = awal + babjudul + "/" + judulgabung + ".html"; wv.loadUrl(alamat); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.layout.menu, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_back: Intent i = new Intent(ViewActivity.this, MainActivity.class); startActivity(i); return true; case R.id.menu_tentang: Intent u = new Intent(ViewActivity.this, TentangActivity.class); startActivity(u); return true; case R.id.menu_keluar: finish(); System.exit(0); default: return super.onOptionsItemSelected(item); } } }
Source code SplashActivity.java package com.prasetyo; import android.app.Activity; import android.content.Intent; import android.media.MediaPlayer; import android.os.Bundle; import android.os.Handler; import android.view.Window; public class SplashActivity extends Activity {
41
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.splash); MediaPlayer audioBackground; // Memanggil file bismillah pada folder raw audioBackground = MediaPlayer.create(this, R.raw.bismillah); // Set looping audioBackground.setLooping(false); // Set volume audioBackground.setVolume(1, 1); // Memulai audio audioBackground.start(); // *menjalankan splash screen dan menu menggunakan delayed thread*/ new Handler().postDelayed(new Thread() { @Override public void run() { Intent SplashToMain = new Intent(SplashActivity.this, MainActivity.class); SplashActivity.this.startActivity(SplashToMain); SplashActivity.this.finish(); overridePendingTransition(R.layout.fadein, R.layout.fadeout); } }, 5000); } }
Source code TentangActivity.java package com.prasetyo; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; public class TentangActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tentang); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater();
42
menuInflater.inflate(R.layout.menu, menu); return true; } public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_back: Intent i = new Intent(TentangActivity.this, MainActivity.class); startActivity(i); return false; case R.id.menu_tentang: return false; case R.id.menu_keluar: this.finish(); return false; default: return super.onOptionsItemSelected(item); } } }
Source code main.xml
<EditText android:id="@+id/inputSearch" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Cari" />
Source code view.xml
43
android:layout_height="match_parent" android:orientation="vertical" > <WebView android:id="@+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent" />
Source code splash.xml
Source code fadein.xml
Source code fadeout.xml
Source code tentang.xml
44
android:layout_width="match_parent" android:layout_height="100dp" >
45
Source code AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.prasetyo" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="15" />
46