]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DictionaryManagerActivity.java
Organize imports, fix Lint deprecation warnings (or add flags where
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryManagerActivity.java
index dab77f5d776bad583940fbe6e134e77d8fd53407..65e9bf32cec4e08319d9d43f4eb623425fe89f10 100644 (file)
 
 package com.hughes.android.dictionary;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
+import com.hughes.android.dictionary.DictionaryInfo.IndexInfo;
+import com.hughes.android.util.IntentLauncher;
 
-import android.app.AlertDialog;
 import android.app.ListActivity;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.Editor;
@@ -39,7 +36,6 @@ import android.view.MenuItem.OnMenuItemClickListener;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.WindowManager;
-import android.webkit.WebView;
 import android.widget.AdapterView;
 import android.widget.AdapterView.AdapterContextMenuInfo;
 import android.widget.AdapterView.OnItemClickListener;
@@ -53,9 +49,9 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.hughes.android.dictionary.DictionaryInfo.IndexInfo;
-import com.hughes.android.util.IntentLauncher;
-import com.hughes.util.StringUtil;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 
 public class DictionaryManagerActivity extends ListActivity {
 
@@ -132,23 +128,7 @@ public class DictionaryManagerActivity extends ListActivity {
     final String thanksForUpdatingLatestVersion = getString(R.string.thanksForUpdatingVersion);
     if (!prefs.getString(C.THANKS_FOR_UPDATING_VERSION, "").equals(thanksForUpdatingLatestVersion)) {
       blockAutoLaunch = true;
-      final AlertDialog.Builder builder = new AlertDialog.Builder(this);
-      builder.setCancelable(false);
-      final WebView webView = new WebView(getApplicationContext());
-      webView.loadData(StringUtil.readToString(getResources().openRawResource(R.raw.whats_new)), "text/html", "utf-8");
-      builder.setView(webView);
-      builder.setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-          public void onClick(DialogInterface dialog, int id) {
-               dialog.cancel();
-          }
-      });
-      final AlertDialog alert = builder.create();
-      WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
-      layoutParams.copyFrom(alert.getWindow().getAttributes());
-      layoutParams.width = WindowManager.LayoutParams.FILL_PARENT;
-      layoutParams.height = WindowManager.LayoutParams.FILL_PARENT;
-      alert.show();
-      alert.getWindow().setAttributes(layoutParams);
+      startActivity(HtmlDisplayActivity.getWhatsNewLaunchIntent());
       prefs.edit().putString(C.THANKS_FOR_UPDATING_VERSION, thanksForUpdatingLatestVersion).commit();
     }
   }