Created
January 31, 2017 06:42
-
-
Save alfianyusufabdullah/91f18a2be97380fa3294fea71b271170 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.developerrandom.belajarmengirimdata; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
public class ActivityPenerima extends AppCompatActivity { | |
/// BUAT VARIABEL 2 TEXTVIEW | |
TextView Nama; | |
TextView Alamat; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_penerima); | |
/// MELAKUKAN INISIALISASI EDITTEXT & BUTTON DENGAN ID YANG KITA TELAH TAMBAH DI XML | |
Nama = (TextView) findViewById(R.id.dataNama); | |
Alamat = (TextView) findViewById(R.id.dataAlamat); | |
/// MENGAMBIL DATA YANG DIKIRIM KEMUDIAN MEN SETNYA KE DALAM TEXTVIEW | |
String strNama = getIntent().getStringExtra(MainActivity.KEY_NAMA); | |
String strAlamat = getIntent().getStringExtra(MainActivity.KEY_ALAMAT); | |
Nama.setText(strNama); | |
Alamat.setText(strAlamat); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment