package com.example.ghomi.chapter5_3;

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();
        String fName = intent1.getStringExtra("fname");
        String sEmail = intent1.getStringExtra("email");
        disp.setText("Your name is: " + fName + "\n" + "Your email is:" + sEmail);
    }
    public void onClickBack(View v){
        finish();
    }
}
