summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid A. Madore <david+git@madore.org>2010-04-26 19:17:24 +0200
committerDavid A. Madore <david+git@madore.org>2010-04-26 19:17:24 +0200
commitcddec9d933c4bc46e4bec6094630ea7a19fd6860 (patch)
tree0b5b1ba7d9c043d322cfdba1d9b6fc99abcb89ac /src
parent6fdb1a4b8f2fa07cabc742d71048e8f5ecfdaac8 (diff)
downloadUnicodeMap-cddec9d933c4bc46e4bec6094630ea7a19fd6860.tar.gz
UnicodeMap-cddec9d933c4bc46e4bec6094630ea7a19fd6860.tar.bz2
UnicodeMap-cddec9d933c4bc46e4bec6094630ea7a19fd6860.zip
Move certain constant strings to resources.
Diffstat (limited to 'src')
-rw-r--r--src/org/madore/android/unicodeMap/UnicodeMapActivity.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
index aee9e71..def8537 100644
--- a/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
+++ b/src/org/madore/android/unicodeMap/UnicodeMapActivity.java
@@ -20,7 +20,7 @@ public final class UnicodeMapActivity extends ListActivity {
protected UnicodeDatabase db;
protected final List<UnicodeDisplayable> rootList
- = new ArrayList<UnicodeDisplayable>(100);
+ = new ArrayList<UnicodeDisplayable>(200);
protected final List<List<UnicodeDisplayable>> stack
= new ArrayList<List<UnicodeDisplayable>>(10);
@@ -28,8 +28,8 @@ public final class UnicodeMapActivity extends ListActivity {
protected void launchPopulation() {
final ProgressDialog progress = new ProgressDialog(this);
progress.setOwnerActivity(this);
- progress.setTitle("Loading Unicode database");
- progress.setMessage("Please wait");
+ progress.setTitle(R.string.loading_database_title);
+ progress.setMessage(getResources().getText(R.string.loading_database_msg));
progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progress.setCancelable(false);
progress.show();
@@ -57,7 +57,6 @@ public final class UnicodeMapActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- android.util.Log.v("UnicodeMapActivity", "creating activity");
setContentView(R.layout.main_layout);
db = new UnicodeDatabase(this);
final boolean needPopulate = db.needPopulate();
@@ -74,7 +73,8 @@ public final class UnicodeMapActivity extends ListActivity {
btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
cmgr.setText(txt.getText());
- Toast.makeText(getApplicationContext(), "Copied to clipboard",
+ Toast.makeText(getApplicationContext(),
+ R.string.copied_toast,
Toast.LENGTH_SHORT).show();
}
});
@@ -96,7 +96,8 @@ public final class UnicodeMapActivity extends ListActivity {
list.add(ch);
stack.add(list);
setListAdapter(new UnicodeArrayAdapter(UnicodeMapActivity.this, list));
- }
+ } else
+ throw new AssertionError("unknown UnicodeDisplayable");
}
});
}