summaryrefslogtreecommitdiffstats
path: root/src/org/madore
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/madore')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index a13f73a..f9f2a34 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -31,11 +31,14 @@ public final class UnicodeMapActivity extends ListActivity {
public final UnicodeArrayAdapter adapter;
public final int selPosition;
public final int yOffset;
+ public final CharSequence title;
public ViewHistory(UnicodeArrayAdapter adapter,
- int selPosition, int yOffset) {
+ int selPosition, int yOffset,
+ CharSequence title) {
this.adapter = adapter;
this.selPosition = selPosition;
this.yOffset = yOffset;
+ this.title = title;
}
}
@@ -82,7 +85,9 @@ public final class UnicodeMapActivity extends ListActivity {
yOffset = selView.getTop();
else
yOffset = 0;
- historyStack.add(new ViewHistory(adapter, selPosition, yOffset));
+ CharSequence title = getTitle();
+ historyStack.add(new ViewHistory(adapter, selPosition, yOffset,
+ title));
}
protected void saveView() {
@@ -100,7 +105,9 @@ public final class UnicodeMapActivity extends ListActivity {
yOffset = view.getTop();
else
yOffset = 0;
- historyStack.add(new ViewHistory(adapter, position, yOffset));
+ CharSequence title = getTitle();
+ historyStack.add(new ViewHistory(adapter, position, yOffset,
+ title));
}
protected class MapItemClickListener
@@ -124,6 +131,9 @@ public final class UnicodeMapActivity extends ListActivity {
list);
saveView(view, position);
setListAdapter(adapter);
+ setTitle(String.format(getResources()
+ .getString(R.string.app_name_spec),
+ ((UnicodeCharacter.Range)it).getDescr()));
} else
throw new AssertionError("unknown UnicodeDisplayable");
}
@@ -231,6 +241,10 @@ public final class UnicodeMapActivity extends ListActivity {
list);
saveView();
setListAdapter(adapter);
+ setTitle(String.format(getResources()
+ .getString(R.string.app_name_spec),
+ getResources()
+ .getString(R.string.search_results)));
if ( overflowed ) {
String str = getResources().getString(R.string.list_too_long);
android.util.Log.e("UnicodeMapActivity", "format is: "+str);
@@ -284,6 +298,7 @@ public final class UnicodeMapActivity extends ListActivity {
final ListView lv = getListView();
ViewHistory saved = historyStack.remove(historyStack.size()-1);
setListAdapter(saved.adapter);
+ setTitle(saved.title);
lv.setSelectionFromTop(saved.selPosition, saved.yOffset);
return true;
} else if ( keyCode == KeyEvent.KEYCODE_SEARCH ) {