package com.example.ghomi.chapter5_4;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
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 uname = (EditText)findViewById(R.id.editText);
        EditText pass = (EditText)findViewById(R.id.editText2);
        String sname = uname.getText().toString();
        String spass = pass.getText().toString();
        Intent intent = new Intent(this, CalledActivity.class);
        Bundle b = new Bundle();
        b.putString("uname", sname);
        b.putString("pass", spass);
        intent.putExtra("bundleData", b);
        startActivity(intent);
    }
}
