Automated import from //branches/donutburger/...@140535,140535
diff --git a/src/com/android/browser/FindDialog.java b/src/com/android/browser/FindDialog.java
index 43cd1c4..6e9574c 100644
--- a/src/com/android/browser/FindDialog.java
+++ b/src/com/android/browser/FindDialog.java
@@ -179,7 +179,7 @@
Spannable span = (Spannable) mEditText.getText();
span.setSpan(this, 0, span.length(),
Spannable.SPAN_INCLUSIVE_INCLUSIVE);
- mMatches.setText(R.string.zero);
+ setMatchesFound(0);
disableButtons();
}
@@ -206,11 +206,11 @@
} else {
mMatchesView.setVisibility(View.VISIBLE);
int found = mWebView.findAll(find.toString());
- mMatches.setText(Integer.toString(found));
+ setMatchesFound(found);
if (found < 2) {
disableButtons();
if (found == 0) {
- mMatches.setText(R.string.zero);
+ setMatchesFound(0);
}
} else {
mPrevButton.setFocusable(true);
@@ -221,6 +221,13 @@
}
}
+ private void setMatchesFound(int found) {
+ String template = mBrowserActivity.getResources().
+ getQuantityString(R.plurals.matches_found, found, found);
+
+ mMatches.setText(template);
+ }
+
public void afterTextChanged(Editable s) {
}
}