package com.example.shared01;


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class SecondActivity extends Activity {

	// UI References
	private TextView textTxt;
	
	private String text;
	
	private SharePreference sharePreference;

	Activity context = this;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_second);
				
		sharePreference = new SharePreference();

		findViewsById();
		
		//Retrieve a value from SharedPreference
		text = sharePreference.getValue(context);
		textTxt.setText(text);
		
	}

	private void findViewsById() {
		textTxt = (TextView) findViewById(R.id.textView1);
	}

	
}