diff --git a/mobile/res/menu/main.xml b/mobile/res/menu/main.xml
index 8b1dea23..410b2bce 100644
--- a/mobile/res/menu/main.xml
+++ b/mobile/res/menu/main.xml
@@ -10,11 +10,6 @@
android:showAsAction="never"
android:title="@string/action_settings">
-
-
- close
Build Version
IITC Version
+ About
- About
- About
+ About IITC Mobile
-
+
Ingress Intel Total Conversion Mobile
by cradle
Icon by machtwerk
@@ -31,6 +31,7 @@
https://github.com/breunigs/ingress-intel-total-conversion]]>
+ UI
Force desktop mode
Nice for tablets, looks awful on smartphones
Developer options
diff --git a/mobile/res/xml/preferences.xml b/mobile/res/xml/preferences.xml
index 6c26dc55..fd50c037 100644
--- a/mobile/res/xml/preferences.xml
+++ b/mobile/res/xml/preferences.xml
@@ -1,10 +1,23 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_AboutDialogPreference.java b/mobile/src/com/cradle/iitc_mobile/IITC_AboutDialogPreference.java
new file mode 100644
index 00000000..bb9d7ca0
--- /dev/null
+++ b/mobile/src/com/cradle/iitc_mobile/IITC_AboutDialogPreference.java
@@ -0,0 +1,46 @@
+package com.cradle.iitc_mobile;
+
+import android.app.AlertDialog.Builder;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.preference.DialogPreference;
+import android.text.Html;
+import android.text.method.LinkMovementMethod;
+import android.util.AttributeSet;
+import android.widget.TextView;
+
+public class IITC_AboutDialogPreference extends DialogPreference{
+
+ private Context context;
+
+ public IITC_AboutDialogPreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ this.context = context;
+ }
+
+ /*
+ * start a little about-dialog
+ * srsly...I found no better way for clickable links in a TextView then
+ * using Html.fromHtml...Linkify ist just broken and does not understand
+ * html href tags...so let's tag the @string/about_msg with CDATA and
+ * use Html.fromHtml(...) for clickable hrefs with tags.
+ */
+ @Override
+ protected void onPrepareDialogBuilder(Builder builder) {
+ final TextView message = new TextView(context);
+ String about_msg = context.getText(R.string.pref_about_msg).toString();
+ message.setText(Html.fromHtml(about_msg));
+ message.setMovementMethod(LinkMovementMethod.getInstance());
+ builder.setView(message)
+ .setTitle(R.string.about)
+ .setIcon(R.drawable.ic_stat_about)
+ .setNeutralButton(R.string.close, new OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ });
+ super.onPrepareDialogBuilder(builder);
+ }
+
+}
diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
index 999b53c0..aa0e683a 100644
--- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
+++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java
@@ -13,20 +13,14 @@ import android.os.Handler;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.app.Activity;
-import android.app.AlertDialog;
import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
-import android.text.Html;
-import android.text.method.LinkMovementMethod;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
-import android.widget.TextView;
import android.widget.Toast;
public class IITC_Mobile extends Activity {
@@ -165,30 +159,6 @@ public class IITC_Mobile extends Activity {
intent.putExtra("iitc_version", iitc_view.getWebViewClient().getIITCVersion());
startActivity(intent);
return true;
- /*
- * start a little about-dialog
- * srsly...I found no better way for clickable links in a TextView then
- * using Html.fromHtml...Linkify ist just broken and does not understand
- * html href tags...so let's tag the @string/about_msg with CDATA and
- * use Html.fromHtml(...) for clickable hrefs with tags.
- */
- case R.id.about:
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- final TextView message = new TextView(this);
- String about_msg = this.getText(R.string.about_msg).toString();
- message.setText(Html.fromHtml(about_msg));
- message.setMovementMethod(LinkMovementMethod.getInstance());
- builder.setView(message)
- .setTitle(R.string.about_title)
- .setIcon(R.drawable.ic_stat_about)
- .setNeutralButton(R.string.close, new OnClickListener() {
- public void onClick(DialogInterface dialog, int id) {
- dialog.cancel();
- }
- });
- AlertDialog dialog = builder.create();
- dialog.show();
- return true;
default:
return super.onOptionsItemSelected(item);
}