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.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index 01f5fdb..f50ef1f 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -327,6 +327,30 @@ public final class UnicodeMapActivity extends ListActivity {
text.setText(new String(s));
text = (TextView) dialog.findViewById(R.id.categoryLabel);
text.setText(itch.getCategory().getDescr());
+ if ( UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A.belongs(itch)
+ || UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS.belongs(itch)
+ || UnicodeCharacter.Range.CJK_COMPATIBILITY_IDEOGRAPHS.belongs(itch)
+ || UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B.belongs(itch)
+ || UnicodeCharacter.Range.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C.belongs(itch)
+ || UnicodeCharacter.Range.CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT.belongs(itch) ) {
+ Button btn = new Button(UnicodeMapActivity.this);
+ btn.setText(R.string.unihan_lookup);
+ ((LinearLayout) dialog.findViewById(R.id.detailsLayout))
+ .addView(btn,
+ ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.WRAP_CONTENT);
+ final String tgt
+ = String.format("http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%04X",
+ itch.getCodePoint());
+ btn.setOnClickListener(new View.OnClickListener() {
+ public void onClick(View view) {
+ Intent intent
+ = new Intent(Intent.ACTION_VIEW,
+ Uri.parse(tgt));
+ startActivity(intent);
+ }
+ });
+ }
dialog.show();
return true;
} else if ( it instanceof UnicodeRangeable ) {