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.widget.EditText;
import android.content.Intent;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    public void onClickTransfer(View view){
        EditText fname = (EditText)findViewById(R.id.editText);
        EditText email = (EditText)findViewById(R.id.editText2);
        String sname = fname.getText().toString();
        String sEmail = email.getText().toString();
        Intent intent = new Intent(this, CalledActivity.class);
        intent.putExtra("fname", sname);
        intent.putExtra("email", sEmail);
        startActivity(intent);
    }
}
