Placeholder for activity stream UI
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ddf8f1e..5140546 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -165,6 +165,16 @@
</intent-filter>
</activity-alias>
+ <!-- Activity stream list -->
+ <activity android:name="ActivityStreamActivity">
+ <intent-filter>
+ <action android:name="com.android.contacts.action.ACTIVITY_STREAM" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.TAB" />
+ </intent-filter>
+ </activity>
+
+
<!-- The actual list of contacts, usually embedded in ContactsActivity -->
<activity android:name="ContactsListActivity"
android:label="@string/contactsList"
diff --git a/res/layout-finger/activity_list_content.xml b/res/layout-finger/activity_list_content.xml
new file mode 100644
index 0000000..32b7ffc
--- /dev/null
+++ b/res/layout-finger/activity_list_content.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical">
+
+ <ListView android:id="@android:id/list"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:fastScrollEnabled="true"
+ />
+
+ <ScrollView android:id="@android:id/empty"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:fillViewport="true"
+ >
+ <TextView android:id="@+id/emptyText"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/noContacts"
+ android:textSize="20sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:paddingLeft="10dip"
+ android:paddingRight="10dip"
+ android:paddingTop="10dip"
+ android:lineSpacingMultiplier="0.92"
+ />
+ </ScrollView>
+</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7906f4a..982479e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -319,6 +319,9 @@
<!-- Section header in the Edit Contacts screen for the "Add more items" button -->
<string name="listSeparatorMore_edit">More</string>
+ <!-- The description text for the activity stream tab. Space is limited for this string, so the shorter the better -->
+ <string name="activityStreamIconLabel">Stream</string>
+
<!-- The description text for the contacts tab. Space is limited for this string, so the shorter the better -->
<string name="contactsIconLabel">Contacts</string>
diff --git a/src/com/android/contacts/ActivityStreamActivity.java b/src/com/android/contacts/ActivityStreamActivity.java
new file mode 100644
index 0000000..0440864
--- /dev/null
+++ b/src/com/android/contacts/ActivityStreamActivity.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.contacts;
+
+import android.app.ListActivity;
+import android.os.Bundle;
+import android.widget.ArrayAdapter;
+
+public class ActivityStreamActivity extends ListActivity {
+
+ @Override
+ protected void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+
+ setContentView(R.layout.activity_list_content);
+
+ setListAdapter(new ArrayAdapter<String>(this,
+ android.R.layout.simple_list_item_1));
+ }
+}
diff --git a/src/com/android/contacts/ContactsActivity.java b/src/com/android/contacts/ContactsActivity.java
index fbffc17..d78d19c 100644
--- a/src/com/android/contacts/ContactsActivity.java
+++ b/src/com/android/contacts/ContactsActivity.java
@@ -64,6 +64,7 @@
mTabHost.setOnTabChangedListener(this);
// Setup the tabs
+ setupActivityStreamTab();
setupContactsTab();
setupFavoritesTab();
@@ -88,6 +89,17 @@
}
}
+ private void setupActivityStreamTab() {
+ // Just a placeholder for now
+ Intent intent = new Intent("com.android.contacts.action.LIST_DEFAULT");
+ intent.setClass(this, ActivityStreamActivity.class);
+
+ mTabHost.addTab(mTabHost.newTabSpec("stream")
+ .setIndicator(getText(R.string.activityStreamIconLabel),
+ getResources().getDrawable(R.drawable.ic_tab_contacts))
+ .setContent(intent));
+ }
+
private void setupContactsTab() {
Intent intent = new Intent(UI.LIST_DEFAULT);
intent.setClass(this, ContactsListActivity.class);