Advertisement
gungjreng

Untitled

Aug 16th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.57 KB | None | 0 0
  1. package net.prabowoaz.bukutabungan;
  2.  
  3. import android.support.v7.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.widget.TextView;
  6.  
  7. public class MainActivity2 extends AppCompatActivity {
  8.  
  9.     @Override
  10.     protected void onCreate(Bundle savedInstanceState) {
  11.         super.onCreate(savedInstanceState);
  12.         setContentView(R.layout.activity_main2);
  13.  
  14.         Bundle b = getIntent().getExtras();
  15.         //buat objek dari widget
  16.         TextView nama = (TextView) findViewById(R.id.namaValue);
  17.         TextView tanggal = (TextView) findViewById(R.id.tglValue);
  18.         TextView nips = (TextView) findViewById(R.id.nipsValue);
  19.         TextView kls = (TextView) findViewById(R.id.kelasValue);
  20.         TextView tabunganper = (TextView) findViewById(R.id.tabunganValue);
  21.         TextView agama = (TextView) findViewById(R.id.agamaValue);
  22.         TextView ortu = (TextView) findViewById(R.id.ortuValue);
  23.         TextView walas = (TextView) findViewById(R.id.walasValue);
  24.         TextView alamat = (TextView) findViewById(R.id.alamatValue);
  25.         //menset nilai dari widget textview
  26.         nama.setText(b.getCharSequence("nama"));
  27.         tanggal.setText(b.getCharSequence("tanggal"));
  28.         nips.setText(b.getCharSequence("nisn"));
  29.         kls.setText(b.getCharSequence("class"));
  30.         tabunganper.setText(b.getCharSequence("perhari"));
  31.         agama.setText(b.getCharSequence("religion"));
  32.         ortu.setText(b.getCharSequence("parent"));
  33.         walas.setText(b.getCharSequence("walikls"));
  34.         alamat.setText(b.getCharSequence("address"));
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement