summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2010-04-16 07:23:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-04-16 07:23:12 -0700
commit0c5ad4f1b35ebf3319b68126bd7b4c8a3eb0340a (patch)
treec5d7d61cb6657984e24748605c5783adce26ca23
parente80c6f49d5055e299b7ada91b5967feab66e467b (diff)
parent70b3fb4a7749b21b05906b80e66819f4c135aa4b (diff)
downloadframeworks_base-0c5ad4f1b35ebf3319b68126bd7b4c8a3eb0340a.zip
frameworks_base-0c5ad4f1b35ebf3319b68126bd7b4c8a3eb0340a.tar.gz
frameworks_base-0c5ad4f1b35ebf3319b68126bd7b4c8a3eb0340a.tar.bz2
Merge "For search suggestions in the search dialog, allow the 'title' line of text to be up to 2 lines (rather than the usual 1) if no 'description' line is provided." into froyo
-rw-r--r--core/java/android/app/SuggestionsAdapter.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/SuggestionsAdapter.java b/core/java/android/app/SuggestionsAdapter.java
index cb947b1..8d8864f 100644
--- a/core/java/android/app/SuggestionsAdapter.java
+++ b/core/java/android/app/SuggestionsAdapter.java
@@ -302,6 +302,20 @@ class SuggestionsAdapter extends ResourceCursorAdapter {
} else {
text2 = getStringOrNull(cursor, mText2Col);
}
+
+ // If no second line of text is indicated, allow the first line of text
+ // to be up to two lines if it wants to be.
+ if (TextUtils.isEmpty(text2)) {
+ if (views.mText1 != null) {
+ views.mText1.setSingleLine(false);
+ views.mText1.setMaxLines(2);
+ }
+ } else {
+ if (views.mText1 != null) {
+ views.mText1.setSingleLine(true);
+ views.mText1.setMaxLines(1);
+ }
+ }
setViewText(views.mText2, text2);
}