summaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeCharacter.java1
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java15
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeRangeable.java1
3 files changed, 12 insertions, 5 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeCharacter.java b/src/org/madore/android/unicodeMap/UnicodeCharacter.java
index f399d2b..58835bc 100644
--- a/src/org/madore/android/unicodeMap/UnicodeCharacter.java
+++ b/src/org/madore/android/unicodeMap/UnicodeCharacter.java
@@ -221,6 +221,7 @@ public class UnicodeCharacter implements UnicodeDisplayable {
public int getFrom() { return this.from; }
public int getTo() { return this.to; }
public String getDescr() { return this.descr; }
+ public String getTitle() { return this.descr; }
@Override
public String toString() { return this.descr; }
}
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index 5410b11..2795c28 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -54,7 +54,7 @@ public final class UnicodeMapActivity extends ListActivity {
this.from = from; this.to = to; this.limit = limit;
}
public RangeDisplay(UnicodeRangeable rng, int limit) {
- super(rng.getDescr());
+ super(rng.getTitle());
this.from = rng.getFrom(); this.to = rng.getTo(); this.limit = limit;
}
public int getFrom() { return this.from; }
@@ -162,6 +162,7 @@ public final class UnicodeMapActivity extends ListActivity {
// public int getFrom() { return 0x4DF8; }
// public int getTo() { return 0x4E10; }
// public String getDescr() { return "TEST"; }
+ // public String getTitle() { return "TEST"; }
// });
for ( UnicodeCharacter.Range rng : UnicodeCharacter.Range.values() )
list.add(rng);
@@ -177,13 +178,17 @@ public final class UnicodeMapActivity extends ListActivity {
int from0 = from&(~127);
int to0 = ((to-1)|127)+1;
for ( int base=from0 ; base<to0 ; base+=128 ) {
- final int from1 = base<from?from:base;
- final int to1 = base+128>to?to:base+128;
- final String str = String.format("%04X\u2013%04X", from1, to1-1);
+ final int from1 = Math.max(from,base);
+ final int to1 = Math.min(to,base+128);
+ final String descr
+ = String.format("%04X\u2013%04X", from1, to1-1);
+ final String title
+ = String.format("%s (%s)", disp.getTitle(), descr);
list.add(new UnicodeRangeable() {
public int getFrom() { return from1; }
public int getTo() { return to1; }
- public String getDescr() { return str; }
+ public String getDescr() { return descr; }
+ public String getTitle() { return title; }
});
}
} else {
diff --git a/src/org/madore/android/unicodeMap/UnicodeRangeable.java b/src/org/madore/android/unicodeMap/UnicodeRangeable.java
index c3a7825..89bc5b7 100644
--- a/src/org/madore/android/unicodeMap/UnicodeRangeable.java
+++ b/src/org/madore/android/unicodeMap/UnicodeRangeable.java
@@ -4,4 +4,5 @@ public interface UnicodeRangeable extends UnicodeDisplayable {
public int getFrom();
public int getTo();
public String getDescr();
+ public String getTitle();
}