package com.example.nfc;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import java.lang.String;
import java.text.SimpleDateFormat;
import java.util.Date;

public class extra extends Activity {
	SharedPreferences preferences;
	SharedPreferences.Editor editor;

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.extra);
		TextView text_view1 = (TextView) findViewById(R.id.textView1);
		TextView text_view2 = (TextView) findViewById(R.id.textView2);
		TextView text_view3 = (TextView) findViewById(R.id.textView3);
		TextView text_view4 = (TextView) findViewById(R.id.textView4);

		preferences = getSharedPreferences("carinfo", MODE_PRIVATE);
		if (preferences == null) {
			text_view1.setText("您暂时还未写入数据");
		} else {
			text_view1.setText("地址:"+ preferences.getString("address", null));
			text_view2.setText("停车场区域:" + preferences.getString("area", null)+ "区");
			text_view3.setText("车位号码:" + preferences.getString("number", null)+ "号");
			text_view4.setText("停车时间为:" + preferences.getString("time", null));
		}

	}

}