display the event description at the events list

This commit is contained in:
tibbi 2016-08-04 21:16:03 +02:00
parent 3749ad825a
commit 7178a0bbeb
2 changed files with 15 additions and 0 deletions

View File

@ -36,6 +36,7 @@ public class EventsAdapter extends BaseAdapter {
final Event event = mEvents.get(position);
viewHolder.eventTitle.setText(event.getTitle());
viewHolder.eventDescription.setText(event.getDescription());
viewHolder.eventStart.setText(Formatter.getTime(event.getStartTS()));
if (event.getStartTS() == event.getEndTS()) {
@ -64,6 +65,7 @@ public class EventsAdapter extends BaseAdapter {
static class ViewHolder {
@BindView(R.id.event_item_title) TextView eventTitle;
@BindView(R.id.event_item_description) TextView eventDescription;
@BindView(R.id.event_item_start) TextView eventStart;
@BindView(R.id.event_item_end) TextView eventEnd;

View File

@ -29,7 +29,20 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_toRightOf="@+id/event_item_start"
android:maxLines="1"
android:text="Event title"
android:textSize="@dimen/day_text_size"/>
<TextView
android:id="@+id/event_item_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/event_item_title"
android:layout_marginLeft="@dimen/activity_margin"
android:layout_toRightOf="@+id/event_item_start"
android:alpha=".5"
android:maxLines="1"
android:text="Event description"
android:textSize="@dimen/day_text_size"/>
</RelativeLayout>