From d6faabdfba24aa85683f21595661063166a3d940 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Tue, 27 Apr 2010 04:13:20 +0200 Subject: Add a very hastily written "about". --- res/menu/options_menu.xml | 2 ++ res/values/strings.xml | 9 +++++++++ .../madore/android/unicodeMap/UnicodeMapActivity.java | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+) 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 @@ + 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 @@ Case is insensitive and matches whole string; use a % sign as wildcard (e.g.: "latin%letter r%") search results Only %d first results shown + About + About Unicode Map + 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. + OK 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); } -- cgit v1.2.3