Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.prabowoaz.bukutabungan;
- import android.support.v7.app.AppCompatActivity;
- import android.os.Bundle;
- import android.widget.TextView;
- public class MainActivity2 extends AppCompatActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main2);
- Bundle b = getIntent().getExtras();
- //buat objek dari widget
- TextView nama = (TextView) findViewById(R.id.namaValue);
- TextView tanggal = (TextView) findViewById(R.id.tglValue);
- TextView nips = (TextView) findViewById(R.id.nipsValue);
- TextView kls = (TextView) findViewById(R.id.kelasValue);
- TextView tabunganper = (TextView) findViewById(R.id.tabunganValue);
- TextView agama = (TextView) findViewById(R.id.agamaValue);
- TextView ortu = (TextView) findViewById(R.id.ortuValue);
- TextView walas = (TextView) findViewById(R.id.walasValue);
- TextView alamat = (TextView) findViewById(R.id.alamatValue);
- //menset nilai dari widget textview
- nama.setText(b.getCharSequence("nama"));
- tanggal.setText(b.getCharSequence("tanggal"));
- nips.setText(b.getCharSequence("nisn"));
- kls.setText(b.getCharSequence("class"));
- tabunganper.setText(b.getCharSequence("perhari"));
- agama.setText(b.getCharSequence("religion"));
- ortu.setText(b.getCharSequence("parent"));
- walas.setText(b.getCharSequence("walikls"));
- alamat.setText(b.getCharSequence("address"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement