APLIKASI SIMULASI LAPORAN KEUANGAN PRIBADI BERBASIS ANDROID - POLSRI REPOSITORY

  <? xml version= "1.0" encoding= "utf-8" ?>

  <

  RelativeLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :background= "#CCCCFF" >

  <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :id= "@+id/judul" android :layout_marginTop= "50dp"

android :text= " APLIKASI SIMULASI LAPORAN"

android :textSize= "20dp" android :layout_centerHorizontal= "true" android :textColor= "#000066" android :textStyle= "bold"

  /> < TextView

  android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :id= "@+id/judul2"

android :text= "KEUANGAN PRIBADI BERBASIS"

android :textSize= "20dp" android :layout_centerHorizontal= "true" android :textColor= "#000066" android :textStyle= "bold" android :layout_below= "@id/judul" />

  <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :id= "@+id/judul3" android :text= "ANDROID" android :textSize= "20dp" android :layout_centerHorizontal= "true" android :textColor= "#000066" android :textStyle= "bold" android :layout_below= "@id/judul2"

  /> < ImageView

  android :layout_width= "140dp" android :layout_height= "140dp"

android :background= "@drawable/logopolsri"

android :id= "@+id/imageView" android :layout_marginTop= "25dp" android :layout_centerHorizontal= "true" android :layout_below= "@+id/judul3"

  /> < TextView

  android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "DITA YULIANTI"

  android :textColor= "#000066" android :textStyle= "bold" android :layout_centerHorizontal= "true" android :layout_above= "@+id/txtno" android :id= "@+id/nama"

  <

  /> <

  Button android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/edpemasukkan" android :layout_toRightOf= "@id/edkoin" android :layout_marginLeft= "10dp" android :text= "Pemasukkan" android :textAllCaps= "false" android :textSize= "30dp" android :background= "#FF0000"

  /> <

  android :layout_width= "50dp" android :layout_height= "40dp" android :id= "@+id/edkoin" android :background= "@drawable/petiduet"

  > < ImageView

  RelativeLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "40dp" android :background= "#CCCCFF"

  <? xml version= "1.0" encoding= "utf-8" ?>

  /> <

  >

  RelativeLayout

  /> </

  android :layout_width= "200dp" android :layout_height= "50dp" android :text= "MASUK" android :id= "@+id/buttonlogin" android :textSize= "30dp" android :background= "#02bfbf" android :layout_centerHorizontal= "true" android :textAllCaps= "false" android :layout_alignParentBottom= "true" android :layout_marginBottom= "70dp"

  /> < Button

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "0614 3033 0246" android :textSize= "17dp" android :textColor= "#000066" android :textStyle= "bold" android :id= "@+id/txtno" android :layout_centerHorizontal= "true" android :layout_above= "@+id/buttonlogin" android :layout_marginBottom= "20dp"

  ImageView android :layout_width= "50dp"

  android :id= "@+id/edkoin2" android :background= "@drawable/duithijau"

android :layout_below= "@id/edkoin"

android :layout_marginTop= "30dp"

  /> <

  Button

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :id= "@+id/edpengeluaran" android :layout_toRightOf= "@id/edkoin2" android :layout_marginLeft= "10dp" android :text= "Pengeluaran" android :textAllCaps= "false" android :textSize= "30dp" android :layout_below= "@id/edpemasukkan" android :background= "#FFFF00" android :layout_marginTop= "20dp"

  /> < ImageView

  android :layout_width= "50dp" android :layout_height= "40dp" android :id= "@+id/edkoin3" android :background= "@drawable/duitreceh"

android :layout_below= "@id/edkoin2"

android :layout_marginTop= "30dp" />

  <

  Button

android :layout_width= "match_parent"

android :layout_height= "wrap_content"

android :id= "@+id/edinputtabungan"

android :layout_toRightOf= "@id/edkoin3" android :layout_marginLeft= "10dp" android :text= "Tabungan" android :textAllCaps= "false" android :textSize= "30dp" android :layout_below= "@id/edpengeluaran" android :background= "#33FF00" android :layout_marginTop= "20dp"

  /> <

  ImageView android :layout_width= "50dp" android :layout_height= "40dp" android :id= "@+id/edkoin4" android :background= "@drawable/tangan"

android :layout_below= "@id/edkoin3"

android :layout_marginTop= "30dp"

  /> <

  Button

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :id= "@+id/edadmin" android :layout_toRightOf= "@id/edkoin4" android :layout_marginLeft= "10dp" android :text= "Admin" android :textAllCaps= "false" android :textSize= "30dp" android :layout_below= "@id/edinputtabungan" android :background= "#3366FF" android :layout_marginTop= "20dp"

  /> <

  Button android :layout_width= "120dp"

  android :layout_height= "100dp" android :id= "@+id/edback" android :background= "@drawable/moneybag" android :layout_centerHorizontal= "true" android :layout_alignParentBottom= "true" android :text= " BACK"

style= "?android:attr/borderlessButtonStyle"

android :textColor= "@android:color/white" android :textSize= "25dp"

  /> </ RelativeLayout > < RelativeLayout

  

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "30dp" android :background= "#CCCCFF"

  >> < ImageView

  android :layout_width= "60dp" android :layout_height= "60dp" android :layout_marginTop= "70dp" android :id= "@+id/edduitkertas" android :background= "@drawable/duitkertas"

  /> < Button

  android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/edinputpemasukan"

android :layout_toRightOf= "@id/edduitkertas"

android :layout_marginLeft= "10dp" android :text= "Input Pemasukan" android :layout_marginTop= "80dp" android :textAllCaps= "false" android :textSize= "20dp" android :background= "#dccf14"

  /> <

  ImageView android :layout_width= "60dp" android :layout_height= "60dp" android :id= "@+id/edduitkertas3"

android :background= "@drawable/duitkertas"

android :layout_below= "@id/edduitkertas" android :layout_marginTop= "20dp"

  /> < Button

  android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/edhistoripemasukan"

android :layout_below= "@id/edinputpemasukan"

android :layout_marginLeft= "10dp" android :text= "History Pemasukan" android :textAllCaps= "false" android :textSize= "20dp" android :layout_marginTop= "25dp" android :layout_toRightOf= "@+id/edduitkertas3" android :background= "#29d726"

  /> < Button

  android :layout_height= "100dp" android :id= "@+id/btnMenuPemasukan" android :background= "@drawable/moneybag" android :layout_alignParentBottom= "true" android :layout_centerHorizontal= "true" android :text= " MENU" android :layout_marginBottom= "30dp"

style= "?android:attr/borderlessButtonStyle"

android :textColor= "@android:color/white" android :textSize= "25dp"

  /> </

  RelativeLayout

  >

  <? xml version= "1.0" encoding= "utf-8" ?>

  <

  RelativeLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "30dp" android :background= "#CCCCFF"

  >> <

  ImageView android :layout_width= "60dp" android :layout_height= "60dp" android :layout_marginTop= "70dp" android :id= "@+id/edduitkertas" android :background= "@drawable/duitkertas"

  /> <

  Button android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/edinputpengeluaran"

android :layout_toRightOf= "@id/edduitkertas"

android :layout_marginLeft= "10dp" android :text= "Input Pengeluaran" android :textAllCaps= "false" android :layout_marginTop= "80dp" android :textSize= "20dp" android :background= "#dccf14" />

  <

  ImageView android :layout_width= "60dp" android :layout_height= "60dp" android :id= "@+id/edduitkertas3"

android :background= "@drawable/duitkertas"

android :layout_below= "@id/edduitkertas" android :layout_marginTop= "20dp"

  /> < Button

  android :layout_width= "match_parent" android :layout_height= "wrap_content" android :id= "@+id/edhistoripengeluaran" android :layout_below= "@id/edinputpengeluaran" android :layout_marginLeft= "10dp" android :text= "History Pengeluaran" android :textAllCaps= "false" android :textSize= "20dp" android :layout_marginTop= "25dp"

  android :background= "#29d726"

  android :layout_width= "match_parent" android :layout_height= "wrap_content" android :layout_margin= "20dp" android :id= "@+id/txtLaporan" android :padding= "20dp"

android :background= "@android:color/white"

android :layout_alignParentTop= "true" android :layout_alignLeft= "@+id/textView" android :layout_alignStart= "@+id/textView" />

  <

  

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :paddingLeft= "30dp" android :paddingTop= "50dp" android :background= "#CCCCFF" >

  < RelativeLayout

  <? xml version= "1.0" encoding= "utf-8" ?>

  >

  RelativeLayout

  </

  /> < TextView

  /> < Button

  TextView android :layout_width= "match_parent" android :layout_height= "match_parent" android :background= "@android:color/holo_blue_dark" android :id= "@+id/textView"

  <

  RelativeLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "50dp" android :background= "#CCCCFF" >>

  <

  <? xml version= "1.0" encoding= "utf-8" ?>

  /> </ RelativeLayout >

  android :layout_width= "120dp" android :layout_height= "100dp" android :id= "@+id/btnMenuPengeluaran" android :background= "@drawable/moneybag" android :layout_alignParentBottom= "true" android :layout_centerHorizontal= "true" android :layout_marginBottom= "30dp" android :text= " MENU"

style= "?android:attr/borderlessButtonStyle"

android :textColor= "@android:color/white" android :textSize= "25dp"

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Keterangan Admin" android :layout_centerHorizontal= "true" android :textSize= "25dp" android :id= "@+id/ketadmin"

  /> < TextView

  android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Nama : Dita Yulianti" android :textSize= "18dp" android :layout_marginTop= "50dp" android :textColor= "#333333" />

  <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "NIM : 0614 3033 0246" android :textSize= "18dp" android :layout_marginTop= "80dp" android :textColor= "#333333"

  /> <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Kelas : 6 TA" android :textSize= "18dp" android :layout_marginTop= "110dp" android :textColor= "#333333"

  /> < TextView

  android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Jurusan : Teknik Elektro" android :textSize= "18dp" android :layout_marginTop= "140dp" android :textColor= "#333333"

  /> < TextView

  android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Prodi : T. Telekomunikasi" android :textSize= "18dp" android :layout_marginTop= "170dp" android :textColor= "#333333"

  /> <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Pembimbing 1 : Ir. Ali Nurdin, M.T." android :textSize= "18dp" android :layout_marginTop= "200dp" android :textColor= "#333333"

  /> <

  TextView android :layout_width= "wrap_content" android :layout_height= "wrap_content" android :text= "Pembimbing 2 : Sarjana, S.T., M.Kom" android :textSize= "18dp" android :layout_marginTop= "230dp" android :textColor= "#333333"

  /> <

  Button android :layout_width= "120dp" android :layout_height= "100dp" android :id= "@+id/btnAdmin" android :background= "@drawable/moneybag" android :layout_centerHorizontal= "true"

  android :text= " OK"

style= "?android:attr/borderlessButtonStyle"

android :textColor= "@android:color/white" android :layout_alignParentBottom= "true" android :layout_marginBottom= "30dp" android :textSize= "35dp"

  <

  < RelativeLayout

  <? xml version= "1.0" encoding= "utf-8" ?>

  >

  RelativeLayout

  /> </ LinearLayout > </

  Button android :layout_width= "100dp" android :layout_height= "50dp" android :id= "@+id/btnsimpan" android :layout_gravity= "right" android :text= "Simpan" android :textAllCaps= "false" android :layout_marginTop= "20dp"

  <

  

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :id= "@+id/edketerangan" />

  /> < EditText

  TextView

android :layout_width= "wrap_content"

android :layout_height= "wrap_content" android :layout_marginTop= "20dp" android :text= "Keterangan"

  EditText

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :inputType= "number"

android :id= "@+id/inputpemasukkan" />

  /> </

  /> <

  

android :layout_width= "wrap_content"

android :layout_height= "wrap_content" android :text= "Pemasukan" android :layout_marginTop= "80dp"

  > < TextView

  LinearLayout android :layout_width= "match_parent" android :layout_height= "match_parent" android :orientation= "vertical"

  > <

  

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "40dp"

  < RelativeLayout

  <? xml version= "1.0" encoding= "utf-8" ?>

  >

  RelativeLayout

  

xmlns: android = "http://schemas.android.com/apk/res/android"

android :orientation= "vertical" android :layout_width= "match_parent" android :layout_height= "match_parent" >

  

android :layout_width= "match_parent"

android :layout_height= "wrap_content"

android :id= "@+id/linear" android :orientation= "horizontal" android :paddingLeft= "5dp" android :paddingRight= "5dp" android :paddingTop= "10dp" android :paddingBottom= "10dp" android :background= "@color/colorPrimary"

  > <

  TextView

android :layout_width= "80dp"

android :layout_height= "wrap_content" android :text= "Tanggal" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  /> <

  TextView

android :layout_width= "100dp"

android :layout_height= "wrap_content" android :text= "Uang Masuk" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  /> <

  TextView android :layout_width= "match_parent" android :layout_height= "wrap_content" android :text= "Keterangan" android :textColor= "@android:color/white" android :textSize= "15dp" android :textStyle= "bold"

  /> </ LinearLayout > <

  ListView

android :layout_width= "match_parent"

android :layout_height= "match_parent"

android :layout_below= "@+id/linear" android :layout_above= "@+id/footer" android :id= "@+id/lvPemasukan" />

  <

  LinearLayout

android :layout_width= "match_parent"

android :layout_height= "wrap_content"

android :orientation= "horizontal" android :id= "@+id/footer" android :layout_alignParentBottom= "true" android :paddingLeft= "5dp" android :paddingRight= "5dp" android :paddingTop= "10dp" android :paddingBottom= "10dp" android :background= "@color/colorPrimary"

  > <

  TextView

android :layout_width= "80dp"

android :layout_height= "wrap_content"

android :text= "Total :"

android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  /> < TextView

  /> <

  <

  ?>

  <? xml version= "1.0" encoding= "utf-8"

  > </ RelativeLayout >

  LinearLayout

  /> </

  Button android :layout_width= "100dp" android :layout_height= "50dp" android :id= "@+id/btnsimpan" android :layout_marginTop= "20dp" android :layout_gravity= "right" android :text= "Simpan" android :textAllCaps= "false"

  /> <

  EditText

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :id= "@+id/edketerangan"

  <

  TextView

android :layout_width= "wrap_content"

android :layout_height= "wrap_content" android :layout_marginTop= "30dp" android :text= "Keterangan" />

  

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :inputType= "number"

android :id= "@+id/inputpengeluaran"

  

android :layout_width= "match_parent"

android :layout_height= "wrap_content" android :text= "" android :id= "@+id/txtTotalUang" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  /> < EditText

  TextView

android :layout_width= "wrap_content"

android :layout_height= "wrap_content" android :text= "Pengeluaran" android :layout_marginTop= "80dp"

  <

  android :layout_width= "match_parent" android :layout_height= "match_parent" android :orientation= "vertical" >

  > < LinearLayout

  RelativeLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :layout_width= "match_parent" android :layout_height= "match_parent" android :padding= "40dp"

  <

  ?>

  <? xml version= "1.0" encoding= "utf-8"

  > </ RelativeLayout >

  LinearLayout

  /> </

  RelativeLayout

  android :layout_width= "match_parent" android :layout_height= "match_parent" >

  /> </

  > <

  LinearLayout

android :layout_width= "match_parent"

android :layout_height= "wrap_content"

android :orientation= "horizontal" android :id= "@+id/footer" android :layout_alignParentBottom= "true" android :paddingLeft= "5dp" android :paddingRight= "5dp" android :paddingTop= "10dp" android :paddingBottom= "10dp" android :background= "@color/colorPrimary"

  /> <

  ListView

android :layout_width= "match_parent"

android :layout_height= "match_parent"

android :layout_below= "@+id/linear" android :layout_above= "@+id/footer" android :id= "@+id/lvPengeluaran"

  > <

  LinearLayout

  TextView android :layout_width= "match_parent" android :layout_height= "wrap_content" android :text= "Keterangan" android :textColor= "@android:color/white" android :textSize= "15dp" android :textStyle= "bold"

  <

  /> <

  TextView

android :layout_width= "100dp"

android :layout_height= "wrap_content" android :text= "Uang Keluar" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  /> <

  

android :layout_width= "80dp"

android :layout_height= "wrap_content" android :text= "Tanggal" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  > < TextView

  LinearLayout

android :layout_width= "match_parent"

android :layout_height= "wrap_content"

android :id= "@+id/linear" android :orientation= "horizontal" android :paddingLeft= "5dp" android :paddingRight= "5dp" android :paddingTop= "10dp" android :paddingBottom= "10dp" android :background= "@color/colorPrimary"

  TextView

android :layout_width= "80dp"

android :layout_height= "wrap_content"

  android :text= "Total :" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  TextView android :layout_width= "match_parent" android :layout_height= "wrap_content" android :text= "Nemu dijalan" android :id= "@+id/rowKeterangan" android :padding= "5dp"

  import android.view.View; import

  android.os.Bundle;

  import

  android.support.v7.app.AppCompatActivity;

  import

  android.content.Intent;

  import

  com.example.dita.projectkeuanganpribadi;

  package

  /> </ LinearLayout >

  /> <

  /> <

  TextView android :layout_width= "100dp" android :layout_height= "wrap_content" android :text= "500000000" android :id= "@+id/rowUang" android :padding= "5dp"

  /> <

  TextView android :layout_width= "80dp" android :layout_height= "wrap_content" android :id= "@+id/rowTanggal" android :text= "1" android :padding= "5dp"

  <

  LinearLayout

xmlns: android = "http://schemas.android.com/apk/res/android"

android :orientation= "horizontal" android :layout_width= "match_parent" android :layout_height= "match_parent" >

  <

  <? xml version= "1.0" encoding= "utf-8" ?>

  >

  RelativeLayout

  /> </ LinearLayout > </

  TextView android :layout_width= "match_parent" android :layout_height= "wrap_content" android :text= "" android :id= "@+id/txtTotalUang" android :textSize= "15dp" android :textColor= "@android:color/white" android :textStyle= "bold"

  android.widget.Button;

  MainActivity AppCompatActivity {

  public class extends

  Button btnLogin ;

  @Override

  onCreate(Bundle savedInstanceState) {

  protected void

  .onCreate(savedInstanceState);

  super

  setContentView(R.layout. );

  activity_main btnLogin = (Button)findViewById(R.id. buttonlogin );

  .setOnClickListener( View.OnClickListener() {

  btnLogin new @Override

  onClick(View v) {

  public void

  Intent intent= Intent(MainActivity. ,

  new this

  Activitymenu. class ); startActivity(intent); }

  }); }

  } Activitymenu AppCompatActivity {

  public class extends

  Button btnpemasukan ; Button ;

  btnpengeluaran

  Button ;

  btnInputTabungan

  Button btnAdmin ; Button ;

  btnback @Override

  onCreate(Bundle savedInstanceState) {

  protected void

  .onCreate(savedInstanceState);

  super

  setContentView(R.layout. menu ); = (Button)findViewById(R.id. );

  btnpemasukan edpemasukkan

  =(Button)findViewById(R.id. );

  btnpengeluaran edpengeluaran btnInputTabungan = (Button)

  findViewById(R.id. edinputtabungan ); = (Button) findViewById(R.id. );

  btnAdmin edadmin btnback = (Button)findViewById(R.id. edback );

  .setOnClickListener(

  btnpemasukan new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  Intent intent = new Intent(Activitymenu. this , Activitymenupemasukan. );

  class

  startActivity(intent); } });

  btnpengeluaran .setOnClickListener( new

  View.OnClickListener() {

  @Override public void onClick(View v) {

  Intent intent = Intent(Activitymenu. ,

  new this

  Activitymenupengeluaran. );

  class

  startActivity(intent); }

  });

  btnInputTabungan .setOnClickListener( new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  Intent intent = Intent(Activitymenu. ,

  new this

  LaporanTabungandanKerugian. );

  class

  startActivity(intent); } });

  btnAdmin .setOnClickListener( new View.OnClickListener() { @Override

  onClick(View v) {

  public void

  Intent intent = new Intent(Activitymenu. this , ActivityInputAdmin. );

  class

  startActivity(intent); } });

  .setOnClickListener( View.OnClickListener() {

  btnback new @Override

  onClick(View v) {

  public void

  finish(); } }); } }

  Activitymenupemasukan AppCompatActivity {

  public class extends

  Button ;

  btnMenuInputPemasukan

  Button ;

  btnMenuHistoryPemasukan

  Button ;

  btnMenuPemasukan @Override

  onCreate(Bundle savedInstanceState) {

  protected void

  .onCreate(savedInstanceState);

  super

  setContentView(R.layout. menupemasukan ); = (Button)

  btnMenuInputPemasukan

  findViewById(R.id. );

  edinputpemasukan btnMenuHistoryPemasukan = (Button)

  findViewById(R.id. );

  edhistoripemasukan

  =

  btnMenuPemasukan

  (Button)findViewById(R.id. btnMenuPemasukan ); .setOnClickListener(

  btnMenuInputPemasukan new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  Intent intent =

  new

  Intent(Activitymenupemasukan. this , ActivityInputPemasukan. );

  class

  startActivity(intent); } });

  .setOnClickListener(

  btnMenuHistoryPemasukan new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  Intent intent =

  new

  Intent(Activitymenupemasukan. ,

  this

  ActivityHistoryPemasukan. );

  class

  startActivity(intent); } });

  .setOnClickListener(

  btnMenuPemasukan new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  finish(); } }); } }

  Activitymenupengeluaran AppCompatActivity {

  public class extends

  Button ;

  btnMenuInputpengeluaran

  Button ;

  btnMenuHistorypengeluaran

  Button btnMenuPengeluaran ;

  @Override protected void onCreate(Bundle savedInstanceState) {

  .onCreate(savedInstanceState);

  super

  setContentView(R.layout. );

  menupengeluaran

  = (Button)

  btnMenuInputpengeluaran

  findViewById(R.id. edinputpengeluaran ); = (Button)

  btnMenuHistorypengeluaran

  findViewById(R.id. edhistoripengeluaran ); =

  btnMenuPengeluaran

  (Button)findViewById(R.id. );

  btnMenuPengeluaran

  .setOnClickListener(

  btnMenuInputpengeluaran new

  View.OnClickListener() {

  @Override public void onClick(View v) {

  Intent intent =

  new

  Intent(Activitymenupengeluaran. this , ActivityInputPengeluaran. );

  class

  startActivity(intent); } });

  .setOnClickListener(

  

btnMenuHistorypengeluaran new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  Intent intent =

  new

  Intent(Activitymenupengeluaran. ,

  

this

  ActivityHistoryPengeluaran. );

  class

  } });

  .setOnClickListener(

  btnMenuPengeluaran new

  View.OnClickListener() {

  @Override

  onClick(View v) {

  public void

  finish(); onBackPressed(); } }); } }

  LaporanTabungandanKerugian

  public class extends

  AppCompatActivity { TextView ;

  txtlaporan

  SelectAdaptor ;

  ambildata

  SQLiteDatabase ;

  db

  MenuCustom[] data ; Integer ;

  totalpemasukan

  Integer ;

  totalpengeluaran

  Integer totalakhir ; DatabaseHelper ;

  dbKeuangan @Override

  onCreate( @Nullable Bundle savedInstanceState)

  protected void

  { .onCreate(savedInstanceState);

  super

  setContentView(R.layout. );

  menutabungandankerugian

  =(TextView)findViewById(R.id. txtLaporan );

  txtlaporan

  =

  dbKeuangan new

  DatabaseHelper(LaporanTabungandanKerugian. this ); = .getReadableDatabase();

  db dbKeuangan ambildata = new

  SelectAdaptor(LaporanTabungandanKerugian. );

  this //sama saja seperti di atas

  Cursor c = ambildata .ambilDataIncome( db );

  //cursor untuk menampung data dari database dan c adalah namanya / eksekusi ambilDataIncome data = new MenuCustom[c.getCount()];

  //

  = ;

  totalpemasukan

  (c.getCount()!= ){

  if if (c.moveToFirst()){

  {

  do

  String pemasukan = c.getString(

  1 );

  Integer intPemasukan=Integer.valueOf(pemasukan);

  • =

  totalpemasukan totalpemasukan

  intPemasukan; } (c.moveToNext());

  while

  } }

  =

  ambildata new

  SelectAdaptor(LaporanTabungandanKerugian. this ); Cursor c2 = .ambilDataOutcome( );

  ambildata db

  = MenuCustom[c2.getCount()];

  data new //

  = ;

  totalpengeluaran

  (c2.getCount()!= ){

  if

  (c2.moveToFirst()){

  if do {

  String pengeluaran = c2.getString(

  1 );

  Integer intPengeluaran=Integer.valueOf(pengeluaran);

  • =

  totalpengeluaran totalpengeluaran

  intPengeluaran; } while (c2.moveToNext()); } }

  = ; -

  totalakhir totalpemasukan totalpengeluaran

  ( < ){

  if totalakhir

  .setText(

  txtlaporan "Anda mengalami kerugian sebesar

  ); +

  Rp." totalakhir

  } {

  else txtlaporan .setText( "Anda mempunyai total tabungan

  ); +

  sebesar Rp." totalakhir

  } } }

  ActivityInputAdmin AppCompatActivity {