package com.tryandroid.preference2;

import com.kurukurupapa.tryandroid.fw.util.ActivityUtil;
import com.kurukurupapa.tryandroid.fw.util.LogUtil;
import com.kurukurupapa.tryandroid.fw.util.PreferenceUtil;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Pref21Activity extends Activity {
	public TextView textView;
	public Button editButton;

	public void editButton_OnClick(View view) {
		startActivity(new Intent(this, Pref22Activity.class));
	}

	/*
	 * (非 Javadoc)
	 *
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		LogUtil.called();
		super.onCreate(savedInstanceState);
		ActivityUtil.initializeActivity(this);
	}

	/*
	 * (非 Javadoc)
	 *
	 * @see android.app.Activity#onStart()
	 */
	@Override
	protected void onStart() {
		LogUtil.called();
		super.onStart();
		Pref2Dto dto = PreferenceUtil.getPreferenceDto(this, Pref2Dto.class);
		textView.setText(dto.toString());
	}

}
