package com.usai.apex;

import java.io.InputStream;

import org.apache.http.util.EncodingUtils;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebView;

public class ApexHistoryActivity extends Activity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		Log.d("AboutActivity", "onCreate");

		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_history);

		WebView wv = (WebView) findViewById(R.id.webView1);
		String content = "";
		try
		{
			InputStream in = getResources().openRawResource(R.raw.about);
			// 获取文件的字节数
			int lenght = in.available();
			// 创建byte数组
			byte[] buffer = new byte[lenght];
			// 将文件中的数据读到byte数组中
			in.read(buffer);
			content = EncodingUtils.getString(buffer, "UTF-8");
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		wv.getSettings().setDefaultTextEncodingName("UTF-8");
		wv.loadData(content, "text/html", null);
		
	}
}
