package com.usai.redant.raimage;


import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class AboutActivity extends Activity
{

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		 TextView tv_ver = (TextView) findViewById(R.id.tv_version);

		 TextView zxing = (TextView) findViewById(R.id.zxing);
		 zxing.setOnClickListener(new OnClickListener()
		{
			
			@Override
			public void onClick(View v)
			{
				
				Intent intent = new Intent();
				intent.setClass(AboutActivity.this, LicenseActivity.class);
				startActivity(intent);
				
				
			}
		});
		
		try
		{
			
			tv_ver.setText(getText(R.string.str_ver)
					+ RedAntApplication.getInstance()
							.getPackageManager()
							.getPackageInfo("com.usai.redant.photo", 0).versionName);
		}
		catch (NameNotFoundException e1)
		{
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
	}

//	@Override
//	public boolean onCreateOptionsMenu(Menu menu)
//	{
//		// Inflate the menu; this adds items to the action bar if it is present.
//		getMenuInflater().inflate(R.menu.about, menu);
//		return true;
//	}
//
//	@Override
//	public boolean onOptionsItemSelected(MenuItem item)
//	{
//		// Handle action bar item clicks here. The action bar will
//		// automatically handle clicks on the Home/Up button, so long
//		// as you specify a parent activity in AndroidManifest.xml.
//		int id = item.getItemId();
//		if (id == R.id.action_settings)
//		{
//			return true;
//		}
//		return super.onOptionsItemSelected(item);
//	}
}
