Update UI for Search results
- put the icon on the left - just use the "summaryOn" ellipsized instead of the list of values Change-Id: I7250ff5b7c882b873cfe6bb0ec550a8eaf052d16
This commit is contained in:
@@ -22,6 +22,25 @@
|
||||
android:paddingStart="@*android:dimen/preference_item_padding_side"
|
||||
android:paddingEnd="?android:attr/scrollbarSize">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minWidth="@*android:dimen/preference_icon_minWidth"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="48dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_marginEnd="@*android:dimen/preference_item_padding_inner"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -49,23 +68,4 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:minWidth="@*android:dimen/preference_icon_minWidth"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center"
|
||||
android:minWidth="48dp"
|
||||
android:scaleType="centerInside"
|
||||
android:layout_marginEnd="@*android:dimen/preference_item_padding_inner"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -46,11 +46,14 @@ public class SearchResultsSummary extends Fragment {
|
||||
|
||||
private static final String LOG_TAG = "SearchResultsSummary";
|
||||
|
||||
private static char ELLIPSIS = '\u2026';
|
||||
|
||||
private ListView mListView;
|
||||
|
||||
private SearchResultsAdapter mAdapter;
|
||||
private UpdateSearchResultsTask mUpdateSearchResultsTask;
|
||||
|
||||
|
||||
/**
|
||||
* A basic AsyncTask for updating the query results cursor
|
||||
*/
|
||||
@@ -331,7 +334,6 @@ public class SearchResultsSummary extends Fragment {
|
||||
textTitle.setText(result.title);
|
||||
|
||||
String summaryOn = result.summaryOn;
|
||||
String summaryOff = result.summaryOff;
|
||||
String entries = result.entries;
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
@@ -339,12 +341,7 @@ public class SearchResultsSummary extends Fragment {
|
||||
if (!TextUtils.isEmpty(summaryOn) &&
|
||||
!summaryOn.contains(PERCENT_RECLACE) && !summaryOn.contains(DOLLAR_REPLACE)) {
|
||||
sb.append(summaryOn);
|
||||
if (!TextUtils.isEmpty(summaryOff) &&
|
||||
!summaryOff.contains(PERCENT_RECLACE) &&
|
||||
!summaryOff.contains(DOLLAR_REPLACE)) {
|
||||
sb.append(" \n ");
|
||||
sb.append(summaryOff);
|
||||
}
|
||||
sb.append(ELLIPSIS);
|
||||
}
|
||||
if (!TextUtils.isEmpty(entries)) {
|
||||
sb.append(" \n ");
|
||||
|
Reference in New Issue
Block a user