summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2012-03-16 19:17:13 +0100
committerDavid A. Madore <david+git@madore.org>2012-03-16 19:17:13 +0100
commitd0dc1cb1d518de0a02544654c55b938064e5e3eb (patch)
tree8db01330d08ceb5172319a32538478884704bfaf /src
parent3141ca4e4f232a4efae252fcdb15cc8f84e72fed (diff)
downloadUnicodeMap-d0dc1cb1d518de0a02544654c55b938064e5e3eb.tar.gz
UnicodeMap-d0dc1cb1d518de0a02544654c55b938064e5e3eb.tar.bz2
UnicodeMap-d0dc1cb1d518de0a02544654c55b938064e5e3eb.zip
Add a button to copy a character's name.
Diffstat (limited to 'src')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index f82382b..aecea78 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -345,6 +345,16 @@ public final class UnicodeMapActivity extends ListActivity {
textForm.append(itch.getChar());
}
});
+ final Button copyNameButton = (Button) dialog.findViewById(R.id.copyNameButton);
+ copyNameButton.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View view) {
+ dialog.dismiss();
+ cmgr.setText(itch.getLabel());
+ Toast.makeText(UnicodeMapActivity.this,
+ R.string.copied_toast,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
if ( UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A.belongs(itch)
|| UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS.belongs(itch)
|| UnicodeCharacter.Range.CJK_COMPATIBILITY_IDEOGRAPHS.belongs(itch)