diff --git a/res/layout/list_item_entry.xml b/res/layout/list_item_entry.xml index 999f0dd8..f25d77ea 100644 --- a/res/layout/list_item_entry.xml +++ b/res/layout/list_item_entry.xml @@ -29,8 +29,8 @@ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceSmall" android:singleLine="true" - android:textColor="#CC2222" android:visibility="gone" + android:textColor="@android:color/darker_gray" android:text="" /> diff --git a/src/org/kde/kdeconnect/UserInterface/List/EntryItem.java b/src/org/kde/kdeconnect/UserInterface/List/EntryItem.java index 2e3e91d3..18d40015 100644 --- a/src/org/kde/kdeconnect/UserInterface/List/EntryItem.java +++ b/src/org/kde/kdeconnect/UserInterface/List/EntryItem.java @@ -29,9 +29,16 @@ import org.kde.kdeconnect_tp.R; public class EntryItem implements ListAdapter.Item { private final String title; + private final String subtitle; - public EntryItem(String title) { + public EntryItem(String title) { + this.title = title; + this.subtitle = null; + } + + public EntryItem(String title, String subtitle) { this.title = title; + this.subtitle = subtitle; } @Override @@ -41,6 +48,14 @@ public class EntryItem implements ListAdapter.Item { TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title); if (titleView != null) titleView.setText(title); + if (subtitle != null) { + TextView subtitleView = (TextView) v.findViewById(R.id.list_item_entry_summary); + if (subtitleView != null) { + subtitleView.setVisibility(View.VISIBLE); + subtitleView.setText(subtitle); + } + } + return v; }