DAFTAR PUSTAKA
Adisasmita, Rahardjo. 2011. Manajemen Pemerintah Daerah. Yogyakarta: Penerbit Graha Ilmu. Dennis, Alan,wixom,dan David Tegarden. 2012. Systems analysis and design with UML.USA:John Wiley and Sons inc Dharma,Ahmad.
2015.
Trik
Kolaborasi
Android
Dengan
PHP
dan
MYSQL.Yogyakarta: Lokomedia Fathansyah. 2012. Basis Data. Bandung : INFORMATIKA Huda, Arif Akbarul. 2013. Live Coding! 9 Aplikasi Android buatan Sendiri. Yogyakarta : ANDI Kadir, Abdul. 2011. Mudah Menjadi Programmer JAVA. Yogyakarta : YESKOM Komputer, Wahana. 2013. Android Programming with Eclipse. Yogyakarta : ANDI P, Juhara Zamrony. 2016. Panduan Lengkap Pemrograman Android. Yogyakarta : ANDI Rizky, Soetam. 2011. Konsep Dasar Rekayasa Perangkat Lunak. Jakarta: Prestasi Pustaka. Salbino , Sherief. 2014. Buku Pintar Gadget Android. Brebes :Kunci Komunikasi Sutabri,
Tata.
2012.
Analisa
Sistem
71
Informasi.Yogyakarta:
http://digilib.mercubuana.ac.id/z
ANDI
LAMPIRAN 1. Surat Riset
72
http://digilib.mercubuana.ac.id/z
73
2. Hasil Wawancara
http://digilib.mercubuana.ac.id/z
74
http://digilib.mercubuana.ac.id/z
75
http://digilib.mercubuana.ac.id/z
76
3. Source Code a) menu_home.xml
version="1.0"
android:orientation="ve rtical"
encoding="utf-8"?> android:weightSum="1
.android.com/apk/res/android" android:paddingTop="1 android:layout_width="match_
50dp"
>
parent" <Button android:layout_height="match _parent"
android:id="@+id/btndatamast er"
android:orientation="vertical" android:layout_width="130dp" android:background="@drawa ble/bg1"
android:layout_height="95dp"
android:padding="15dp" > android:layout_gravity="center "
android:layout_width="fill_par
android:background="@drawa
ent"
ble/datamaster" /> android:layout_height=
"wrap_content"
android:layout_gravity=
android:layout_width="fill_par ent"
"center"
http://digilib.mercubuana.ac.id/z
77
android:layout_height= "wrap_content" android:layout_gravity= "center"
b) MenuHome.Java package
android:orientation="ve
com.example.javabatik;
android:weightSum="1
import android.app.Activity;
rtical"
"
import android.content.Intent; import android.view.View;
0dp"
android:paddingTop="1
import android.widget.Button;
>
import android.os.Bundle;
<Button public android:id="@+id/Btnlaporan"
class
MenuHome
extends Activity{ protected
android:layout_width="130dp"
void
onCreate(Bundle savedInstanceState) { // TODO Auto-
android:layout_height="95dp"
generated method stub android:layout_gravity="center "
super.onCreate(savedIn stanceState);
android:background="@drawa ble/laporan"
setContentView(R.layo ut.menu_home);
/>
http://digilib.mercubuana.ac.id/z
78
Button =
btndatamaster
(Button)
findViewById(R.id.btndatamas
});
ter); Button btnlaporan
=
btnlaporan.setOnClickL
(Button)
findViewById(R.id.Btnlaporan
istener(new
);
View.OnClickListener() {
@Override public
btndatamaster.setOnCli
void onClick(View arg0) {
ckListener(new
//
View.OnClickListener()
TODO Auto-generated method stub
{
Intent i2 = new Intent (MenuHome.this, MenuLaporan.class);
@Override public
startActivity(i2);
void onClick(View v) {
}
// });
TODO Auto-generated method stub Intent i = new Intent (MenuHome.this, MainActivity.class);
startActivity(i); }
http://digilib.mercubuana.ac.id/z
}
79
} c) activity_lihat_kas.xml
version="1.0"
android:paddingTop="@dimen/ activity_vertical_margin"
encoding="utf-8"?> tools:context=".LihatKasActivit
.android.com/apk/res/android"
droid.com/tools"
1" android:layout_width="match_ android:layout_width="match_
parent"
parent" android:layout_height="match_ android:layout_height="wrap_
parent"
content" android:background="@drawa android:layout_marginBottom=
ble/bg3"
"20dip" android:paddingBottom="@di men/activity_vertical_margin"
android:layout_marginTop="5d ip"
android:paddingLeft="@dimen /activity_horizontal_margin"
android:paddingRight="@dime
android:background="#0001" >
n/activity_horizontal_margin" android:layout_width="match_ parent"
http://digilib.mercubuana.ac.id/z
80
android:layout_height="wrap_
android:layout_width="match_
content" >
parent"
android:layout_height="wrap_ content"
android:id="@+id/textView01" android:layout_margin="1dp" android:layout_width="match_ parent"
android:layout_weight="1"
android:layout_height="wrap_
android:textColor="#FFF"
content" android:background="#C28347 android:layout_margin="1dp"
"
android:layout_weight="1"
android:gravity="center"
android:textColor="#FFF"
android:padding="10dp"
android:background="#C28347
android:text="textView1" />
"
android:padding="10dp"
android:text="No
:" android:id="@+id/tableRow2"
/>
android:layout_width="match_ parent"
android:id="@+id/textView1"
http://digilib.mercubuana.ac.id/z
81
android:layout_height="wrap_
android:layout_width="match_
content" >
parent"
android:layout_height="wrap_ content"
android:id="@+id/textView02" android:layout_margin="1dp" android:layout_width="match_ parent"
android:layout_weight="1"
android:layout_height="wrap_
android:textColor="#FFF"
content" android:background="#C28347 android:layout_margin="1dp"
"
android:layout_weight="1"
android:gravity="center"
android:textColor="#FFF"
android:padding="10dp"
android:background="#C28347
android:text="textView2" />
"
android:padding="10dp"
android:text="Tanggal :" />
android:id="@+id/tableRow3"
android:layout_width="match_ parent"
android:id="@+id/textView2"
http://digilib.mercubuana.ac.id/z
82
android:layout_height="wrap_
android:layout_width="match_
content" >
parent"
android:layout_height="wrap_ content"
android:id="@+id/textView03" android:layout_margin="1dp" android:layout_width="match_ parent"
android:layout_weight="1"
android:layout_height="wrap_
android:textColor="#FFF"
content" android:background="#C28347 android:layout_margin="1dp"
"
android:layout_weight="1"
android:gravity="center"
android:textColor="#FFF"
android:padding="10dp"
android:background="#C28347
android:text="textView3" />
"
android:padding="10dp"
android:text="Pemasukan :" />
android:id="@+id/tableRow4"
android:layout_width="match_ parent"
android:id="@+id/textView3"
http://digilib.mercubuana.ac.id/z
83
android:layout_height="wrap_
android:id="@+id/textView4"
content" > android:layout_width="match_ parent"
android:id="@+id/textView04"
android:layout_height="wrap_ content"
android:layout_width="match_ parent"
android:layout_margin="1dp"
android:layout_height="wrap_
android:layout_weight="1"
content" android:textColor="#FFF" android:layout_margin="1dp" android:background="#C28347 android:layout_weight="1"
"
android:textColor="#FFF"
android:gravity="center"
android:background="#C28347
android:padding="10dp"
" android:text="textView4" /> android:padding="10dp"
android:text="Pengeluaran
:"
/> android:id="@+id/tableRow5"
http://digilib.mercubuana.ac.id/z
84
android:id="@+id/textView5"
android:layout_height="wrap_
android:layout_width="match_
content" >
parent"
android:layout_height="wrap_ content"
android:id="@+id/textView05" android:layout_margin="1dp" android:layout_width="match_ parent"
android:layout_weight="1"
android:layout_height="wrap_
android:textColor="#FFF"
content" android:background="#C28347 android:layout_margin="1dp"
"
android:layout_weight="1"
android:gravity="center"
android:textColor="#FFF"
android:padding="10dp"
android:background="#C28347
android:text="textView5" />
"
android:padding="10dp"
android:text="Sisa :" />
android:id="@+id/tableRow6"
http://digilib.mercubuana.ac.id/z
85
android:layout_width="match_
parent" android:id="@+id/tableRow7" android:layout_height="wrap_ content" >
android:layout_width="wrap_c ontent"
content" >
android:layout_width="match_
parent" android:id="@+id/textView6" android:layout_height="wrap_ content"
android:layout_width="match_ parent"
android:layout_margin="1dp" android:layout_height="wrap_ android:layout_weight="1"
content"
android:textColor="#FFF"
android:layout_margin="1dp"
android:background="#C28347
android:layout_weight="1"
" android:textColor="#FFF" android:padding="10dp" android:background="#C28347 android:text="Catatan :" />
http://digilib.mercubuana.ac.id/z
"
86
android:gravity="center"
d) Lihat_Kas_Activity.Jav
android:padding="10dp"
a package
android:text="textView6" />
com.example.javabatik;
import android.app.Activity; import
android.database.Cursor; import
<Button
android.database.sqlite.SQLite Database;
android:id="@+id/button1"
import android.os.Bundle; import android.view.Menu;
android:layout_width="90dip"
import android.view.View; import android.widget.Button;
android:layout_height="50dip"
import android.widget.TextView;
android:layout_alignLeft="@+ id/tableLayout1"
public class LihatKasActivity extends Activity{
android:layout_below="@+id/t ableLayout1"
protected Cursor cursor; DataCenter3 dbHelper;
android:background="#C28347 "
Button ton2; TextView text1, text2, text3,
android:text="Kembali"
android:textColor="#FFF" />
http://digilib.mercubuana.ac.id/z
text4, text5, text6;
87
cursor
@Override protected
void
db.rawQuery("SELECT
= *
onCreate(Bundle
FROM kas WHERE tanggal =
savedInstanceState) {
'" +
super.onCreate(savedInstanceS
getIntent().getStringExtra("tan
tate);
ggal") + "'",null); cursor.moveToFirst();
this.setTitle("Lihat Details Kas");
if (cursor.getCount()>0) {
setContentView(R.layout.activi ty_lihat_kas);
cursor.moveToPosition(0);
dbHelper
=
new
DataCenter3(this); text1
=
0).toString()); (TextView)
findViewById(R.id.textView1); text2
=
text1.setText(cursor.getString(
(TextView)
text2.setText(cursor.getString( 1).toString());
findViewById(R.id.textView2); text3
=
(TextView)
findViewById(R.id.textView3); text4
=
=
2).toString());
(TextView)
findViewById(R.id.textView4); text5
text3.setText(cursor.getString(
(TextView)
text4.setText(cursor.getString( 3).toString());
findViewById(R.id.textView5); text6
=
(TextView)
findViewById(R.id.textView6);
text5.setText(cursor.getString( 4).toString());
SQLiteDatabase db = dbHelper.getReadableDatabase
text6.setText(cursor.getString(
();
5).toString());
http://digilib.mercubuana.ac.id/z
88
}
} ton2
=
(Button)
findViewById(R.id.button1);
ton2.setOnClickListener(new e) activity_laporan_barang
View.OnClickListener() {
.xml @Override public
onClick(View arg0) {
encoding="utf-8"?>
// TODO Auto-generated method stub
xmlns:android="http://schemas .android.com/apk/res/android"
finish(); }
xmlns:tools="http://schemas.an
});
droid.com/tools"
} android:id="@+id/LinearLayo @Override public
ut1" boolean
onCreateOptionsMenu(Menu
android:layout_width="match_
menu) {
parent"
// Inflate the menu; this adds items to the action bar if it
android:layout_height="match_
is present.
parent"
getMenuInflater().inflate(R.me
android:background="#C28347
nu.main, menu);
"
return true; }
http://digilib.mercubuana.ac.id/z
89
android:layout_gravity="center "
android:id="@+id/tablebarang android:orientation="vertical"
"
tools:context=".LaporanBaran
android:layout_width="match_
gActivity" >
parent"
android:layout_height="wrap_ content" >
android:id="@+id/horizontalS crollView"
android:layout_width="match_ parent" android:layout_height="wrap_ content" >
f) Laporan_Barang_Activi ty.Java package
<ScrollView
com.example.javabatik; android:id="@+id/verticalScro
import java.util.ArrayList;
llView" import java.util.HashMap; android:layout_width="wrap_c ontent"
import android.app.Activity; import android.graphics.Color;
android:layout_height="match_ parent" >
http://digilib.mercubuana.ac.id/z
import android.os.Bundle;
90
import android.support.v4.view.ViewP
setContentView(R.layout.activi
ager.LayoutParams;
ty_laporan_barang);
import android.widget.TableLayout;
tabelBarang
=
import
(TableLayout)
android.widget.TableRow;
findViewById(R.id.tablebarang );
import android.widget.TextView;
public
class
LaporanBarangActivity
TableRow barisTabel = new TableRow(this);
extends Activity{ DataCenter2 datacenter2 = new
barisTabel.setBackgroundColor
DataCenter2(this);
(Color.GREEN);
TableLayout tabelBarang; protected
void
onCreate(Bundle
TextView viewHeaderNo = new TextView(this);
savedInstanceState) {
TextView viewHeaderTanggal
super.onCreate(savedInstanceS tate);
=
new
TextView(this); TextView
this.setTitle("Laporan Barang");
viewHeaderStokLama = new TextView(this);
http://digilib.mercubuana.ac.id/z
91
TextView viewHeaderBarangMasuk
=
new TextView(this);
viewHeaderStok.setText("Stok ");
TextView viewHeaderStok
=
new
TextView(this);
viewHeaderBarangKeluar.setT ext("Barang Keluar");
TextView viewHeaderBarangKeluar
=
new TextView(this);
viewHeaderSisaBarang.setText ("Sisa Barang");
TextView viewHeaderSisaBarang = new TextView(this); viewHeaderNo.setPadding(5, 1, 5, 1);
viewHeaderNo.setText("No");
viewHeaderTanggal.setPadding (5, 1, 5, 1);
viewHeaderTanggal.setText("T anggal");
viewHeaderStokLama.setPaddi ng(5, 1, 5, 1);
viewHeaderStokLama.setText( "Stok Lama");
viewHeaderBarangMasuk.setP adding(5, 1, 5, 1);
viewHeaderBarangMasuk.setT ext("Barang Masuk");
viewHeaderStok.setPadding(5, 1, 5, 1);
http://digilib.mercubuana.ac.id/z
92
viewHeaderBarangKeluar.setPa
barisTabel.addView(viewHead
dding(5, 1, 5, 1);
erSisaBarang);
viewHeaderSisaBarang.setPadd ing(5, 1, 5, 1); tabelBarang.addView(barisTab el,
new
TableLayout.LayoutParams(La barisTabel.addView(viewHead
youtParams.WRAP_CONTEN T,
erNo);
LayoutParams.WRAP_CONTE NT)); barisTabel.addView(viewHead erTanggal);
barisTabel.addView(viewHead
ArrayList
>
erStokLama);
arrayListBarang
=
datacenter2.tampil_barang(); barisTabel.addView(viewHead if (arrayListBarang.size()
erBarangMasuk);
> 0) { barisTabel.addView(viewHead
for (int i = 0; i < arrayListBarang.size(); i++) {
erStok);
barisTabel.addView(viewHead erBarangKeluar);
http://digilib.mercubuana.ac.id/z
93
HashMap<String, String> hashMapRecordBarang
System.out.println("Tanggal :"
= arrayListBarang.get(i);
+ tanggal);
String
tanggal
=
hashMapRecordBarang.get("ta
System.out.println("Stok Lama
nggal");
:" + stoklama); String
stoklama
=
hashMapRecordBarang.get("st
System.out.println("Barang
oklama");
Masuk :" + bmasuk); String
bmasuk
=
hashMapRecordBarang.get("b
System.out.println("Stok :" +
masuk");
stok); String
stok
=
hashMapRecordBarang.get("st
System.out.println("Barang
ok");
Keluar :" + bkeluar); String
bkeluar
=
hashMapRecordBarang.get("bk
System.out.println("Sisa
eluar");
Barang :" + sisa); String
sisa
=
hashMapRecordBarang.get("sis
System.out.println("No
a");
no); String
no
:"
+
=
hashMapRecordBarang.get("id ");
barisTabel
=
TableRow(this);
if (i % 2 == 0) {
http://digilib.mercubuana.ac.id/z
new
94
TextView barisTabel.setBackgroundColor
viewStlama
(Color.GRAY);
TextView(this);
=
new
} viewStlama.setText(stoklama); TextView viewId = viewStlama.setPadding(5, 1, 5,
new TextView(this);
1); viewId.setText(no); viewId.setPadding(5, 1, 5, 1);
barisTabel.addView(viewStlam a);
barisTabel.addView(viewId); TextView viewBmasuk
new
TextView(this);
TextView viewTanggal
=
=
new
TextView(this);
viewBmasuk.setText(bmasuk);
viewTanggal.setText(tanggal);
viewBmasuk.setPadding(5,
1,
5, 1); viewTanggal.setPadding(5,
1,
5, 1);
barisTabel.addView(viewBmas uk);
barisTabel.addView(viewTang gal); TextView
viewStok
= new TextView(this);
http://digilib.mercubuana.ac.id/z
95
viewSisa.setPadding(5, 1, 5, 1); viewStok.setText(stok); barisTabel.addView(viewSisa); viewStok.setPadding(5, 1, 5, 1);
barisTabel.addView(viewStok) ; tabelBarang.addView(barisTab el, TextView viewBkeluar
new
TableLayout.LayoutParams(
=
new
TextView(this); LayoutParams.MATCH_PARE NT, viewBkeluar.setText(bkeluar);
LayoutParams.MATCH_PARE NT));
viewBkeluar.setPadding(5,
1,
5, 1); } }
barisTabel.addView(viewBkelu ar);
} } TextView viewSisa =
new TextView(this);
viewSisa.setText(sisa);
http://digilib.mercubuana.ac.id/z
96
4. Kartu Asistensi
http://digilib.mercubuana.ac.id/z