summaryrefslogtreecommitdiffstats
path: root/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/madore/android/unicodeMap/UnicodeMapActivity.java')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index 57e6a5e..c72549d 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -191,7 +191,8 @@ public final class UnicodeMapActivity extends ListActivity {
&& rng != UnicodeCharacter.Range.LOW_SURROGATES
&& rng != UnicodeCharacter.Range.PRIVATE_USE_AREA
&& rng != UnicodeCharacter.Range.SUPPLEMENTARY_PRIVATE_USE_AREA_A
- && rng != UnicodeCharacter.Range.SUPPLEMENTARY_PRIVATE_USE_AREA_B )
+ && rng != UnicodeCharacter.Range.SUPPLEMENTARY_PRIVATE_USE_AREA_B
+ && rng != UnicodeCharacter.Range.UNASSIGNED )
list.add(rng);
disp.setListCache(list);
adapter = new UnicodeArrayAdapter(this, list);
@@ -339,6 +340,8 @@ public final class UnicodeMapActivity extends ListActivity {
fmt.format(" 0x%02x", bytes[i]);
text.setText(new String(s));
textMakeSelectableIfPossible(text);
+ text = (TextView) dialog.findViewById(R.id.rangeLabel);
+ text.setText(itch.getRange().getDescr());
text = (TextView) dialog.findViewById(R.id.categoryLabel);
text.setText(itch.getCategory().getDescr());
final Button copyCharButton = (Button) dialog.findViewById(R.id.copyCharButton);
@@ -358,6 +361,19 @@ public final class UnicodeMapActivity extends ListActivity {
textForm.append(itch.getChar());
}
});
+ final Button copyCodeButton = (Button) dialog.findViewById(R.id.copyCodeButton);
+ copyCodeButton.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View view) {
+ dialog.dismiss();
+ StringBuilder s = new StringBuilder();
+ Formatter fmt = new Formatter(s);
+ fmt.format("%04X", itch.getCodePoint());
+ cmgr.setText(new String(s));
+ Toast.makeText(UnicodeMapActivity.this,
+ R.string.copied_toast,
+ Toast.LENGTH_SHORT).show();
+ }
+ });
final Button copyNameButton = (Button) dialog.findViewById(R.id.copyNameButton);
copyNameButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {