aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2011-10-25 13:16:04 -0500
committerAndy Doan <andy.doan@linaro.org>2011-10-25 13:16:04 -0500
commit3b04410d18fe86c408e351fcbd63adbcdbc829f6 (patch)
tree9c452b739b99a70489caf143f0ece8d784d441a3
parent4b73212c6ef626f62f1f7ae091dae47afdf31b5a (diff)
downloadLinaroConnect-3b04410d18fe86c408e351fcbd63adbcdbc829f6.tar.gz
create an activity to display schedule items
-rw-r--r--AndroidManifest.xml3
-rw-r--r--res/layout/schedule_item_activity.xml51
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/strings.xml1
-rw-r--r--src/org/linaro/connect/ScheduleItemActivity.java31
5 files changed, 87 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index eb5b651..29255bb 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -46,6 +46,9 @@
<data android:scheme="http"/>
</intent-filter>
</activity>
+ <activity android:name=".ScheduleItemActivity"
+ android:label="@string/schedule_item">
+ </activity>
</application>
</manifest> \ No newline at end of file
diff --git a/res/layout/schedule_item_activity.xml b/res/layout/schedule_item_activity.xml
new file mode 100644
index 0000000..c8422fa
--- /dev/null
+++ b/res/layout/schedule_item_activity.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@color/main_bg"
+ android:paddingLeft="5px"
+>
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ >
+
+ <TextView android:id="@+id/schedule_item_summary"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:textColor="@color/linaro_green"
+ android:textSize="12sp"
+ />
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+ <TextView android:id="@+id/schedule_item_room"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textSize="10sp"
+ />
+ <TextView android:id="@+id/schedule_item_time"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:gravity="right"
+ android:textSize="10sp"
+ />
+ </LinearLayout>
+ </LinearLayout>
+
+ <TextView android:id="@+id/schedule_item_desc"
+ android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:textSize="10sp"
+ android:paddingLeft="10px"
+ android:paddingRight="10px"
+ android:background="@drawable/rounded"
+ android:textColor="@color/dark_text"
+ />
+</LinearLayout>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 22124bd..543ee83 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -3,4 +3,5 @@
<color name="main_bg">#555</color>
<color name="linaro_green">#88b12d</color>
<color name="light_text">#666666</color>
+ <color name="dark_text">#555</color>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index fd11d78..d3fb3b3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2,4 +2,5 @@
<resources>
<string name="app_name">Linaro Connect</string>
<string name="posting_refresh">Refresh</string>
+ <string name="schedule_item">Linaro Connect - Session</string>
</resources>
diff --git a/src/org/linaro/connect/ScheduleItemActivity.java b/src/org/linaro/connect/ScheduleItemActivity.java
new file mode 100644
index 0000000..ed1d70f
--- /dev/null
+++ b/src/org/linaro/connect/ScheduleItemActivity.java
@@ -0,0 +1,31 @@
+package org.linaro.connect;
+
+import org.linaro.connect.sched.ScheduleItem;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.widget.TextView;
+
+public class ScheduleItemActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ setContentView(R.layout.schedule_item_activity);
+
+ Intent i = getIntent();
+ ScheduleItem si = (ScheduleItem)i.getSerializableExtra(ScheduleItem.INTENT_FIELD);
+
+ setTextView(R.id.schedule_item_summary, si.getSummary());
+ setTextView(R.id.schedule_item_time, si.getStartTime(null));
+ setTextView(R.id.schedule_item_room, si.getLocation());
+ setTextView(R.id.schedule_item_desc, si.getDescription());
+ }
+
+ private void setTextView(int id, String val) {
+ TextView tv = (TextView)findViewById(id);
+ tv.setText(val);
+ }
+}