package com.example.ghomi.chapter5_5;

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

public class DisplayActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display);
        Student student = getIntent().getParcelableExtra("student");
        TextView tview = (TextView)findViewById(R.id.result);
        String resultStr = " name is :" + student.studName;
        resultStr += "\n id is: " + Integer.toString(student.studId);
        tview.setText(resultStr);
    }
    public void onClickBack(View v){
        finish();
    }
}
