see_you/UpdateLogDialog.java

67 lines
1.6 KiB
Java
Raw Normal View History

2014-05-26 10:33:33 +08:00
package org.thinkname.ap.main;
import org.thinkname.ap.R;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.TextView;
public class UpdateLogDialog extends Dialog {
public UpdateLogDialog(Context context) {
super(context);
// TODO Auto-generated constructor stub
}
private WebView webView;
private TextView title;
private Button posiviteBtn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.updatelog);
setTitle("更新日志");
title=(TextView) findViewById(R.id.title);
title.setText("更新日志");
webView=(WebView)this.findViewById(R.id.webviewChanges);
webView.setVisibility(View.GONE);
posiviteBtn=(Button) findViewById(R.id.positiveButton);
posiviteBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
webView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
webView.setVisibility(View.VISIBLE);
super.onPageFinished(view, url);
}
});
webView.getSettings().setDefaultTextEncodingName("utf-8");
webView.loadUrl("file:///android_asset/changes.html");
}
protected void onStop() {
Log.d("TAG","+++++++++++++++++++++++++++");
}
}