From cddec9d933c4bc46e4bec6094630ea7a19fd6860 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Mon, 26 Apr 2010 19:17:24 +0200 Subject: Move certain constant strings to resources. --- src/org/madore/android/unicodeMap/UnicodeMapActivity.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/org') 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 rootList - = new ArrayList(100); + = new ArrayList(200); protected final List> stack = new ArrayList>(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"); } }); } -- cgit v1.2.3