From 59344057fca1e5fe5292036877dd01452edbc967 Mon Sep 17 00:00:00 2001 From: Robert Kolner Date: Wed, 21 Sep 2011 21:51:39 +0200 Subject: [PATCH] Added description to EventViewActivity --- .../app/ui/EventViewActivity.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/com/studentersamfundet/app/ui/EventViewActivity.java b/src/com/studentersamfundet/app/ui/EventViewActivity.java index 4d0974c..54b339e 100644 --- a/src/com/studentersamfundet/app/ui/EventViewActivity.java +++ b/src/com/studentersamfundet/app/ui/EventViewActivity.java @@ -35,12 +35,20 @@ public class EventViewActivity extends BaseDnsActivity { location.setText(Html.fromHtml(e.location)); datetime.setText(Html.fromHtml(e.date)); - if (e.text.length() > 0) { - description.setText(Html.fromHtml(e.text)); - } else if (e.description.length() > 0) { - description.setText(Html.fromHtml(e.description)); + StringBuilder sb = new StringBuilder(); + + if (e.description.length() > 0) { + sb.append(""); + sb.append(e.description); + sb.append("

"); } + if (e.text.length() > 0) { + sb.append(e.text); + } + + description.setText(Html.fromHtml(sb.toString())); + if (e.id > 0) { // if id exists and seems legit link.setVisibility(View.VISIBLE); link.setOnClickListener(new OnClickListener() {