Add group detail fragment on tablet
- Add action bar on GroupDetailActivity, title, and subtitle
- Make everything use the groupUri instead of passing around
account name, type, group Id, and group title
- Fix some of the callback listeners between the group fragments
and group activities
- Add factory methods to ContactListFilter
Change-Id: I63066ea6eefde1e57562b6396d6dc590ed023c84
diff --git a/res/layout-xlarge/group_detail_fragment.xml b/res/layout-xlarge/group_detail_fragment.xml
new file mode 100644
index 0000000..a824319
--- /dev/null
+++ b/res/layout-xlarge/group_detail_fragment.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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:id="@+id/group_detail"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/panel_content">
+
+ <TextView
+ android:id="@+id/group_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/group_detail_border_padding"
+ android:paddingTop="@dimen/group_detail_vertical_padding"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/group_size"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/group_detail_border_padding"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="?android:attr/textColorSecondary" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="?android:attr/listDivider"
+ android:layout_marginTop="@dimen/group_detail_vertical_padding"
+ android:layout_marginBottom="@dimen/group_detail_vertical_padding"
+ android:layout_marginLeft="@dimen/group_detail_divider_margin"
+ android:layout_marginRight="@dimen/group_detail_divider_margin" />
+
+ <ListView android:id="@android:id/list"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="@dimen/group_detail_border_padding"
+ android:layout_marginRight="@dimen/group_detail_border_padding"
+ android:cacheColorHint="#00000000"
+ android:divider="@null" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-xlarge/people_activity.xml b/res/layout-xlarge/people_activity.xml
index 3fbb3d2..969bbf9 100644
--- a/res/layout-xlarge/people_activity.xml
+++ b/res/layout-xlarge/people_activity.xml
@@ -84,10 +84,16 @@
ex:exitAnimation="@android:animator/fade_out"
ex:animationDuration="200">
<fragment
- android:id="@+id/detail_fragment"
+ android:id="@+id/contact_detail_fragment"
class="com.android.contacts.detail.ContactDetailFragment"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="match_parent"
+ />
+ <fragment
+ android:id="@+id/group_detail_fragment"
+ class="com.android.contacts.group.GroupDetailFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
/>
</view>
diff --git a/res/layout/group_browse_list_item.xml b/res/layout/group_browse_list_item.xml
index accbedd..28f4e17 100644
--- a/res/layout/group_browse_list_item.xml
+++ b/res/layout/group_browse_list_item.xml
@@ -14,7 +14,9 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<view
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ class="com.android.contacts.group.GroupBrowseListAdapter$GroupListItem"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -26,7 +28,8 @@
android:layout_height="match_parent"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
- android:layout_gravity="center_vertical" />
+ android:layout_gravity="center_vertical"
+ android:src="@drawable/ic_menu_display_all_holo_light" />
<LinearLayout
android:orientation="vertical"
@@ -57,4 +60,4 @@
</LinearLayout>
-</LinearLayout>
+</view>
diff --git a/res/layout/group_detail_fragment.xml b/res/layout/group_detail_fragment.xml
index 70d67b6..76f7214 100644
--- a/res/layout/group_detail_fragment.xml
+++ b/res/layout/group_detail_fragment.xml
@@ -21,7 +21,7 @@
android:layout_height="match_parent">
<ListView
- android:id="@+id/member_list"
+ android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbarStyle="outsideOverlay"/>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ff7d873..68655d8 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -111,4 +111,13 @@
<!-- Height of list sections (A, B, C) that show the first character of the contacts -->
<dimen name="list_section_height">25dip</dimen>
+
+ <!-- Border padding for the group detail fragment header -->
+ <dimen name="group_detail_border_padding">20dip</dimen>
+
+ <!-- Vertical padding for the group detail fragment header -->
+ <dimen name="group_detail_vertical_padding">15dip</dimen>
+
+ <!-- Margins for the group detail fragment divider in the header -->
+ <dimen name="group_detail_divider_margin">15dip</dimen>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index aefb719..d57cb10 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -162,7 +162,7 @@
</style>
<!-- TODO: Clean up this file so themes aren't copied. -->
- <style name="GroupDetailTheme" parent="@android:Theme">
+ <style name="GroupDetailTheme" parent="android:Theme.Holo.Light">
<item name="list_item_height">?android:attr/listPreferredItemHeight</item>
<item name="activated_background">@drawable/list_item_activated_background</item>
<item name="section_header_background">@drawable/list_title_holo</item>