package com.example.ghomi.chapter5_4;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.content.Intent;

public class CalledActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_called);
    }
    public void onClickResult(View v) {
        TextView disp = (TextView) findViewById(R.id.result);
        Intent intent1 = getIntent();
        Bundle b = intent1.getBundleExtra("bundleData");
        String uname = b.getString("uname");
        String pass = b.getString("pass");
        disp.setText("Your name is: " + uname + "\n" + "Your email is:" + pass);
    }

    public void onClickBack(View v){
        finish();
    }
}
