aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2011-10-25 13:17:00 -0500
committerAndy Doan <andy.doan@linaro.org>2011-10-25 13:17:00 -0500
commit5bbe0816ddf8f65a90a7a93f5a4fca70b3529a8f (patch)
tree0385ee0d3316c537462bb0d97413191fc1ee6bcd
parent3b04410d18fe86c408e351fcbd63adbcdbc829f6 (diff)
downloadLinaroConnect-5bbe0816ddf8f65a90a7a93f5a4fca70b3529a8f.tar.gz
update getIntent to launch new scheduleitem activity
-rw-r--r--src/org/linaro/connect/sched/ScheduleItem.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/org/linaro/connect/sched/ScheduleItem.java b/src/org/linaro/connect/sched/ScheduleItem.java
index b9cf2cc..f45386a 100644
--- a/src/org/linaro/connect/sched/ScheduleItem.java
+++ b/src/org/linaro/connect/sched/ScheduleItem.java
@@ -13,6 +13,7 @@ import java.util.HashMap;
import java.util.List;
import org.linaro.connect.LinaroConnect;
+import org.linaro.connect.ScheduleItemActivity;
import android.content.Context;
import android.content.Intent;
@@ -22,6 +23,10 @@ import android.util.Log;
public class ScheduleItem implements Serializable {
+ public final static String INTENT_FIELD = "schedule_item";
+
+ private static final long serialVersionUID = 1L;
+
private final HashMap<String, String> mFields;
private ScheduleItem() {
@@ -37,7 +42,10 @@ public class ScheduleItem implements Serializable {
}
public String getDescription() {
- return mFields.get("DESCRIPTION");
+ String desc = mFields.get("DESCRIPTION");
+ if( desc != null )
+ desc = desc.replaceAll("\\\\N", "\\\n");
+ return desc;
}
public String getLocation() {
@@ -103,7 +111,9 @@ public class ScheduleItem implements Serializable {
}
public Intent getIntent(Context ctx) {
- return null;
+ Intent i = new Intent(ctx, ScheduleItemActivity.class);
+ i.putExtra(INTENT_FIELD, this);
+ return i;
}
private static ScheduleItem parseLine(String line, ScheduleItem cur,