summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2010-04-27 04:13:20 +0200
committerDavid A. Madore <david+git@madore.org>2010-04-27 04:13:20 +0200
commitd6faabdfba24aa85683f21595661063166a3d940 (patch)
tree29e5bcd8a9e63dfcee1c85b3472b4f6d41006b18
parent1796a65fd4803ca107ea0eec2e158216d8e86e74 (diff)
downloadUnicodeMap-d6faabdfba24aa85683f21595661063166a3d940.tar.gz
UnicodeMap-d6faabdfba24aa85683f21595661063166a3d940.tar.bz2
UnicodeMap-d6faabdfba24aa85683f21595661063166a3d940.zip
Add a very hastily written "about".
-rw-r--r--res/menu/options_menu.xml2
-rw-r--r--res/values/strings.xml9
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java18
3 files changed, 29 insertions, 0 deletions
diff --git a/res/menu/options_menu.xml b/res/menu/options_menu.xml
index a187813..2cb4eb9 100644
--- a/res/menu/options_menu.xml
+++ b/res/menu/options_menu.xml
@@ -2,4 +2,6 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menuSearch"
android:title="@string/menu_search" />
+ <item android:id="@+id/menuAbout"
+ android:title="@string/menu_about" />
</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f7fc1c7..6c90667 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13,4 +13,13 @@
<string name="search_hint">Case is insensitive and matches whole string; use a % sign as wildcard (e.g.: "latin%letter r%")</string>
<string name="search_results">search results</string>
<string name="list_too_long">Only %d first results shown</string>
+ <string name="menu_about">About</string>
+ <string name="about_title">About Unicode Map</string>
+ <string name="about_text">Unicode Map version 0.0.1\nby David
+ A. Madore\n\n(Unfinished and Unstable!)\n\nThe code for this
+ program is in the Public Domain; data is by the Unicode
+ consortium.\nNote 1: Android displays most characters as
+ rectangles, but you can still paste them correctly (e.g., in web
+ forms).\nNote 2: Yes, CJK ideographs are missing.</string>
+ <string name="ok_button">OK</string>
</resources>
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index f9f2a34..d260ff6 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -291,6 +291,21 @@ public final class UnicodeMapActivity extends ListActivity {
dialog.show();
}
+ protected void displayAbout() {
+ final Dialog dialog = new Dialog(UnicodeMapActivity.this);
+ dialog.setTitle(R.string.about_title);
+ dialog.setOwnerActivity(this);
+ dialog.setContentView(R.layout.about_layout);
+ dialog.setCancelable(true);
+ final Button btn = (Button) dialog.findViewById(R.id.aboutOk);
+ btn.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View view) {
+ dialog.dismiss();
+ }
+ });
+ dialog.show();
+ }
+
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if ( ( keyCode == KeyEvent.KEYCODE_BACK )
@@ -314,6 +329,9 @@ public final class UnicodeMapActivity extends ListActivity {
case R.id.menuSearch:
querySearch();
return true;
+ case R.id.menuAbout:
+ displayAbout();
+ return true;
default:
return super.onContextItemSelected(item);
}