summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-07-29 10:18:41 -0700
committerJohn Reck <jreck@google.com>2011-07-29 10:18:41 -0700
commit6a9afa94e282efa9f6f44b02be54e384765d853c (patch)
tree93a80840f0975cee2f1db4a825dd572f09e132e2
parent10aa4bd07ad26c4797abc1bc85e71bd49a6299b7 (diff)
downloadpackages_apps_browser-6a9afa94e282efa9f6f44b02be54e384765d853c.zip
packages_apps_browser-6a9afa94e282efa9f6f44b02be54e384765d853c.tar.gz
packages_apps_browser-6a9afa94e282efa9f6f44b02be54e384765d853c.tar.bz2
Allow suggestions to span 2 lines
Bug: 4603029 Change-Id: If0d914a559d32f33a7b75cd1103a6a972082f396
-rw-r--r--res/layout/suggestion_item.xml2
-rw-r--r--src/com/android/browser/SuggestionsAdapter.java2
2 files changed, 3 insertions, 1 deletions
diff --git a/res/layout/suggestion_item.xml b/res/layout/suggestion_item.xml
index 2bd5466..2def735 100644
--- a/res/layout/suggestion_item.xml
+++ b/res/layout/suggestion_item.xml
@@ -50,7 +50,7 @@
<TextView
android:id="@android:id/text1"
style="@style/SuggestionLineMedium"
- android:singleLine="true"
+ android:maxLines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 30b4738..e1511b9 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -182,9 +182,11 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable,
tv1.setText(Html.fromHtml(item.title));
if (TextUtils.isEmpty(item.url)) {
tv2.setVisibility(View.GONE);
+ tv1.setMaxLines(2);
} else {
tv2.setVisibility(View.VISIBLE);
tv2.setText(item.url);
+ tv1.setMaxLines(1);
}
int id = -1;
switch (item.type) {