Added new display groups UI from spec.

Instead of only displaying a single group, we allow the
user to toggle the visibility of all available groups, and
the backend provider takes care of the visibility logic to
keep our list-of-contacts cursor spiffy.

This UI has some limitations and is just a first revision,
for example you can't display contacts from a provider that
aren't part of a group, other than picking the gloal "all
contacts" option.  Also, filtering to "only with phones" can
be confusing to users, need to iterate.

The group list is a custom ExpandableListAdapter that walks
the summary cursor, splitting each source package into its
own expandable group.  There is some fancy work done so this
only requires one cursor, so it scales nicely.
diff --git a/res/layout-finger/display_child.xml b/res/layout-finger/display_child.xml
new file mode 100644
index 0000000..ed4856a
--- /dev/null
+++ b/res/layout-finger/display_child.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
+    android:paddingRight="?android:attr/scrollbarSize"
+>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1"
+        android:duplicateParentState="true"
+    >
+
+        <TextView
+            android:id="@android:id/text1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:ellipsize="marquee"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:duplicateParentState="true"
+        />
+
+        <TextView
+            android:id="@android:id/text2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@android:id/text1"
+            android:layout_alignLeft="@android:id/text1"
+            android:maxLines="2"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:duplicateParentState="true"
+        />
+
+    </RelativeLayout>
+
+    <CheckBox
+        android:id="@android:id/checkbox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="4dip"
+        android:focusable="false"
+        android:clickable="false"
+        android:gravity="center_vertical"
+        android:orientation="vertical"
+        android:duplicateParentState="true"
+    />
+
+</LinearLayout>
diff --git a/res/layout-finger/display_group.xml b/res/layout-finger/display_group.xml
new file mode 100644
index 0000000..48ff7f4
--- /dev/null
+++ b/res/layout-finger/display_group.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
+    android:paddingRight="?android:attr/scrollbarSize"
+>
+
+    <TextView
+        android:id="@android:id/text1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1"
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:duplicateParentState="true"
+    />
+
+    <CheckBox
+        android:id="@android:id/checkbox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="4dip"
+        android:focusable="false"
+        android:clickable="false"
+        android:gravity="center_vertical"
+        android:orientation="vertical"
+        android:visibility="gone"
+        android:duplicateParentState="true"
+    />
+
+</LinearLayout>
diff --git a/res/layout-finger/display_header.xml b/res/layout-finger/display_header.xml
new file mode 100644
index 0000000..a55c5d0
--- /dev/null
+++ b/res/layout-finger/display_header.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical"
+    android:paddingRight="?android:attr/scrollbarSize"
+>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="20dip"
+        android:layout_marginRight="6dip"
+        android:layout_marginTop="6dip"
+        android:layout_marginBottom="6dip"
+        android:layout_weight="1"
+    >
+
+        <TextView
+            android:id="@android:id/text1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:ellipsize="marquee"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+        />
+
+        <TextView
+            android:id="@android:id/text2"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@android:id/text1"
+            android:layout_alignLeft="@android:id/text1"
+            android:maxLines="2"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+        />
+
+    </RelativeLayout>
+
+    <CheckBox
+        android:id="@android:id/checkbox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="4dip"
+        android:focusable="false"
+        android:clickable="false"
+        android:gravity="center_vertical"
+        android:orientation="vertical"
+    />
+
+</LinearLayout>
diff --git a/res/values/ids.xml b/res/values/ids.xml
index 8d85e21..6bcb44d 100644
--- a/res/values/ids.xml
+++ b/res/values/ids.xml
@@ -18,4 +18,7 @@
     <!-- The EditText for entries in the EditContactActivity -->
     <item type="id" name="data" />
 
+    <item type="id" name="header_all" />
+    <item type="id" name="header_phones" />
+
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f717f41..6b18ce5 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -251,7 +251,10 @@
     <string name="customLabelPickerTitle">Custom label name</string>
 
     <!-- The menu item to open the list of groups to display -->
-    <string name="menu_displayGroup">Display group</string>
+    <string name="menu_displayGroup">Display groups</string>
+
+    <!-- Title of activity that lets user pick which contact groups to display -->
+    <string name="displayGroups">Display groups</string>
 
     <!-- The menu item that leads to the settings for contact syncing -->
     <string name="syncGroupPreference">Edit sync groups</string>
@@ -293,6 +296,25 @@
     <!-- The description of all groups when asking the user what they want to display -->
     <string name="showAllGroups">All contacts</string>
 
+    <!-- The title of the filter to only show contacts with phone numbers -->
+    <string name="showFilterPhones">Only contacts with phones</string>
+
+    <!-- The description of the filter to only show contacts with phone numbers -->
+    <string name="showFilterPhonesDescrip">Only display contacts that have phone numbers</string>
+
+    <!-- The header over the list of all contacts groups -->
+    <string name="headerContactGroups">Contact groups</string>
+
+    <!-- The description of a group with the total number of contacts -->
+    <plurals name="groupDescrip">
+        <item quantity="other"><xliff:g id="count">%0$d</xliff:g> contacts</item>
+    </plurals>
+
+    <!-- The description of a group with the total number of contacts, and the total number of contacts with phone numbers -->
+    <plurals name="groupDescripPhones">
+        <item quantity="other"><xliff:g id="count">%1$d</xliff:g> contacts, <xliff:g id="countWithPhones">%2$d</xliff:g> with phones</item>
+    </plurals>
+
     <!-- The setting to sync all contacts from the server -->
     <string name="syncAllGroups">Sync all contacts</string>