summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/char_details.xml4
-rw-r--r--res/values/strings.xml1
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java10
3 files changed, 15 insertions, 0 deletions
diff --git a/res/layout/char_details.xml b/res/layout/char_details.xml
index b51ec87..c271da0 100644
--- a/res/layout/char_details.xml
+++ b/res/layout/char_details.xml
@@ -36,4 +36,8 @@
android:layout_weight="1"
android:text="@string/append_button" />
</LinearLayout>
+ <Button android:id="@+id/copyNameButton"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/copy_name_button" />
</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1111696..16c6e06 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5,6 +5,7 @@
<string name="loading_database_title">Initializing database</string>
<string name="loading_database_msg">Please wait</string>
<string name="copy_button">Copy</string>
+ <string name="copy_name_button">Copy name</string>
<string name="append_button">Append</string>
<string name="copied_toast">Copied to clipboard</string>
<string name="empty_list">(Empty!)</string>
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)