Merge "Fixed & simplified missed call & voicemail notifications."
diff --git a/res/drawable-hdpi/panel_favorites_holo_light.9.png b/res/drawable-hdpi/panel_favorites_holo_light.9.png
new file mode 100644
index 0000000..effe70c
--- /dev/null
+++ b/res/drawable-hdpi/panel_favorites_holo_light.9.png
Binary files differ
diff --git a/res/drawable-hdpi/statusbox_attribute_holo.9.png b/res/drawable-hdpi/statusbox_attribute_holo.9.png
deleted file mode 100644
index 13ffd7a..0000000
--- a/res/drawable-hdpi/statusbox_attribute_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/panel_favorites_holo_light.9.png b/res/drawable-mdpi/panel_favorites_holo_light.9.png
new file mode 100644
index 0000000..fb76aa7
--- /dev/null
+++ b/res/drawable-mdpi/panel_favorites_holo_light.9.png
Binary files differ
diff --git a/res/drawable-mdpi/statusbox_attribute_holo.9.png b/res/drawable-mdpi/statusbox_attribute_holo.9.png
deleted file mode 100644
index bc5e10f..0000000
--- a/res/drawable-mdpi/statusbox_attribute_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/panel_favorites_holo_light.9.png b/res/drawable-xhdpi/panel_favorites_holo_light.9.png
new file mode 100644
index 0000000..13212c4
--- /dev/null
+++ b/res/drawable-xhdpi/panel_favorites_holo_light.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/statusbox_attribute_holo.9.png b/res/drawable-xhdpi/statusbox_attribute_holo.9.png
deleted file mode 100644
index b2b82e4..0000000
--- a/res/drawable-xhdpi/statusbox_attribute_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
index 427f369..0e89d24 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_updates_fragment.xml
@@ -14,22 +14,9 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:id="@+id/contact_detail_updates_fragment"
+<ListView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:padding="16dip">
-
- <include
- android:id="@+id/title"
- layout="@layout/contact_detail_kind_title_entry_view" />
-
- <ListView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/background_social_updates"
- android:divider="@null"/>
-
-</LinearLayout>
+ android:background="@color/background_social_updates"
+ android:divider="@null"/>
diff --git a/res/layout-sw580dp-w1000dp/people_activity.xml b/res/layout-sw580dp-w1000dp/people_activity.xml
index 7d8d064..9a7c5ae 100644
--- a/res/layout-sw580dp-w1000dp/people_activity.xml
+++ b/res/layout-sw580dp-w1000dp/people_activity.xml
@@ -118,23 +118,32 @@
android:background="@drawable/list_background_holo">
<!-- Starred -->
- <fragment
- android:id="@+id/favorites_fragment"
- class="com.android.contacts.list.ContactTileListFragment"
+ <FrameLayout
+ android:layout_width="0dip"
android:layout_height="match_parent"
- style="@style/FavoritesFragmentStyle"
- android:layout_marginTop="32dip"
- android:layout_marginLeft="32dip"
- android:layout_marginRight="32dip" />
+ android:layout_weight="7"
+ android:background="@drawable/panel_favorites_holo_light">
+
+ <fragment
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_marginLeft="32dip"/>
+
+ </FrameLayout>
<!-- Most Frequent -->
<fragment
android:id="@+id/frequent_fragment"
class="com.android.contacts.list.ContactTileListFragment"
- style="@style/FrequentFragmentStyle"
+ android:layout_width="0dip"
android:layout_height="match_parent"
- android:layout_marginTop="32dip"
- android:layout_marginRight="32dip"/>
+ android:layout_weight="3"
+ android:layout_marginTop="32dip"/>
+
</LinearLayout>
</view>
diff --git a/res/layout-sw580dp/contact_picker_content.xml b/res/layout-sw580dp/contact_picker_content.xml
deleted file mode 100644
index 225b725..0000000
--- a/res/layout-sw580dp/contact_picker_content.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:layout_marginTop="1dip"
- android:layout_marginBottom="1dip"
- android:background="#7e7e87" />
-
- <view
- class="com.android.contacts.list.ContactEntryListView"
- android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:fastScrollEnabled="true"
- android:layout_weight="1"/>
-
- <ViewStub
- android:id="@+id/footer_stub"
- android:layout="@layout/footer_panel"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
-</LinearLayout>
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index 35c11b1..feeff6c 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -110,23 +110,32 @@
android:background="@drawable/list_background_holo">
<!-- Starred -->
- <fragment
- android:id="@+id/favorites_fragment"
- class="com.android.contacts.list.ContactTileListFragment"
+ <FrameLayout
+ android:layout_width="0dip"
android:layout_height="match_parent"
- style="@style/FavoritesFragmentStyle"
- android:layout_marginTop="32dip"
- android:layout_marginLeft="32dip"
- android:layout_marginRight="32dip" />
+ android:layout_weight="1"
+ android:background="@drawable/panel_favorites_holo_light">
+
+ <fragment
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_marginLeft="32dip"/>
+
+ </FrameLayout>
<!-- Most Frequent -->
<fragment
android:id="@+id/frequent_fragment"
class="com.android.contacts.list.ContactTileListFragment"
- style="@style/FrequentFragmentStyle"
+ android:layout_width="0dip"
android:layout_height="match_parent"
- android:layout_marginTop="32dip"
- android:layout_marginRight="32dip"/>
+ android:layout_weight="1"
+ android:layout_marginTop="32dip"/>
+
</LinearLayout>
</view>
diff --git a/res/layout-w470dp/contact_detail_updates_fragment.xml b/res/layout-w470dp/contact_detail_updates_fragment.xml
index dd7cfbd..60d728d 100644
--- a/res/layout-w470dp/contact_detail_updates_fragment.xml
+++ b/res/layout-w470dp/contact_detail_updates_fragment.xml
@@ -20,22 +20,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <LinearLayout
+ <ListView android:id="@android:id/list"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <include
- android:id="@+id/title"
- layout="@layout/contact_detail_kind_title_entry_view" />
-
- <ListView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:background="@color/background_social_updates"
- android:divider="@null"/>
-
- </LinearLayout>
+ android:layout_height="wrap_content"
+ android:background="@color/background_social_updates"
+ android:divider="@null"/>
<View
android:id="@+id/alpha_overlay"
diff --git a/res/layout/call_detail.xml b/res/layout/call_detail.xml
index 08b283a..714bbd8 100644
--- a/res/layout/call_detail.xml
+++ b/res/layout/call_detail.xml
@@ -19,178 +19,191 @@
android:id="@+id/call_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="horizontal"
- android:gravity="top"
android:visibility="gone"
>
- <FrameLayout
- android:id="@+id/voicemail_status"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:visibility="gone"
- >
- <include layout="@layout/call_log_voicemail_status"/>
- </FrameLayout>
-
- <view
- class="com.android.contacts.widget.ProportionalLayout"
- android:id="@+id/contact_background_sizer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_below="@id/voicemail_status"
- ex:ratio="0.5"
- ex:direction="widthToHeight"
- >
- <ImageView
- android:id="@+id/contact_background"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:adjustViewBounds="true"
- android:scaleType="centerCrop"
- />
- </view>
- <LinearLayout
- android:id="@+id/blue_separator"
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="@android:color/holo_blue_light"
- android:layout_below="@+id/contact_background_sizer"
- />
- <LinearLayout
- android:id="@+id/voicemail_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/blue_separator"
- >
- <!-- The voicemail fragment will be put here. -->
- </LinearLayout>
- <View
- android:id="@+id/photo_text_bar"
- android:layout_width="match_parent"
- android:layout_height="42dip"
- android:background="#7F000000"
- android:layout_alignParentLeft="true"
- android:layout_alignBottom="@id/contact_background_sizer"
- />
- <ImageView
- android:id="@+id/main_action"
- android:layout_width="wrap_content"
- android:layout_height="0dip"
- android:scaleType="center"
- android:layout_alignRight="@id/photo_text_bar"
- android:layout_alignBottom="@id/photo_text_bar"
- android:layout_alignTop="@id/photo_text_bar"
- android:layout_marginRight="@dimen/call_log_outer_margin"
- />
- <TextView
- android:id="@+id/header_text"
- android:layout_width="wrap_content"
- android:layout_height="0dip"
- android:layout_alignLeft="@id/photo_text_bar"
- android:layout_toLeftOf="@id/main_action"
- android:layout_alignTop="@id/photo_text_bar"
- android:layout_alignBottom="@id/photo_text_bar"
- android:layout_marginRight="@dimen/call_log_inner_margin"
- android:layout_marginLeft="@dimen/call_detail_contact_name_margin"
- android:gravity="center_vertical"
- android:textColor="?attr/call_log_primary_text_color"
- android:textSize="18sp"
- android:singleLine="true"
- />
- <ImageButton
- android:id="@+id/main_action_push_layer"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignLeft="@id/contact_background_sizer"
- android:layout_alignTop="@id/contact_background_sizer"
- android:layout_alignRight="@id/contact_background_sizer"
- android:layout_alignBottom="@id/contact_background_sizer"
- android:background="?android:attr/selectableItemBackground"
- />
- <FrameLayout android:id="@+id/call_and_sms_container"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@id/voicemail_container"
- android:layout_marginTop="@dimen/call_log_icon_margin"
- >
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/call_and_sms"
- android:layout_width="match_parent"
- android:layout_height="@dimen/call_log_list_item_height"
- android:orientation="horizontal"
- android:layout_marginTop="@dimen/call_log_icon_margin"
- android:gravity="center_vertical"
- android:background="@drawable/dialpad_background"
- >
-
- <LinearLayout android:id="@+id/call_and_sms_main_action"
- android:layout_width="0dip"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:paddingLeft="@dimen/call_log_indent_margin"
- android:orientation="vertical"
- android:gravity="center_vertical"
- android:focusable="true"
- android:background="@drawable/btn_dial"
- >
-
- <TextView android:id="@+id/call_and_sms_text1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceLarge"
- />
-
- <LinearLayout android:id="@+id/call_and_sms_line2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- >
- <TextView android:id="@+id/call_and_sms_label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="5dip"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold"
- />
-
- <TextView android:id="@+id/call_and_sms_number"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
- </LinearLayout>
-
- </LinearLayout>
-
- <View android:id="@+id/call_and_sms_divider"
- android:layout_width="1px"
- android:layout_height="32dip"
- android:background="@drawable/ic_divider_dashed_holo_dark"
- android:layout_gravity="center_vertical"
- />
-
- <ImageView android:id="@+id/call_and_sms_icon"
- android:layout_width="@color/call_log_voicemail_highlight_color"
- android:layout_height="match_parent"
- android:paddingLeft="@dimen/call_log_inner_margin"
- android:paddingRight="@dimen/call_log_outer_margin"
- android:gravity="center"
- android:scaleType="centerInside"
- android:focusable="true"
- android:background="@drawable/btn_dial"
- />
- </LinearLayout>
- </FrameLayout>
+ <!--
+ The list view is under everything.
+ It contains a first header element which is hidden under the controls UI.
+ When scrolling, the controls move up until the name bar hits the top.
+ -->
<ListView
android:id="@+id/history"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/call_log_icon_margin"
android:layout_alignParentLeft="true"
- android:layout_below="@id/call_and_sms_container"
+ android:layout_alignParentTop="true"
android:background="@android:color/black"
/>
+
+ <!-- All the controls which are part of the pinned header are in this layout. -->
+ <RelativeLayout
+ android:id="@+id/controls"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ >
+ <FrameLayout
+ android:id="@+id/voicemail_status"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentTop="true"
+ android:visibility="gone"
+ >
+ <include layout="@layout/call_log_voicemail_status"/>
+ </FrameLayout>
+
+ <view
+ class="com.android.contacts.widget.ProportionalLayout"
+ android:id="@+id/contact_background_sizer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_below="@id/voicemail_status"
+ ex:ratio="0.5"
+ ex:direction="widthToHeight"
+ >
+ <ImageView
+ android:id="@+id/contact_background"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:adjustViewBounds="true"
+ android:scaleType="centerCrop"
+ />
+ </view>
+ <LinearLayout
+ android:id="@+id/blue_separator"
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="@android:color/holo_blue_light"
+ android:layout_below="@+id/contact_background_sizer"
+ />
+ <LinearLayout
+ android:id="@+id/voicemail_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/blue_separator"
+ android:background="@android:color/black"
+ >
+ <!-- The voicemail fragment will be put here. -->
+ </LinearLayout>
+ <View
+ android:id="@+id/photo_text_bar"
+ android:layout_width="match_parent"
+ android:layout_height="42dip"
+ android:background="#7F000000"
+ android:layout_alignParentLeft="true"
+ android:layout_alignBottom="@id/contact_background_sizer"
+ />
+ <ImageView
+ android:id="@+id/main_action"
+ android:layout_width="wrap_content"
+ android:layout_height="0dip"
+ android:scaleType="center"
+ android:layout_alignRight="@id/photo_text_bar"
+ android:layout_alignBottom="@id/photo_text_bar"
+ android:layout_alignTop="@id/photo_text_bar"
+ android:layout_marginRight="@dimen/call_log_outer_margin"
+ />
+ <TextView
+ android:id="@+id/header_text"
+ android:layout_width="wrap_content"
+ android:layout_height="0dip"
+ android:layout_alignLeft="@id/photo_text_bar"
+ android:layout_toLeftOf="@id/main_action"
+ android:layout_alignTop="@id/photo_text_bar"
+ android:layout_alignBottom="@id/photo_text_bar"
+ android:layout_marginRight="@dimen/call_log_inner_margin"
+ android:layout_marginLeft="@dimen/call_detail_contact_name_margin"
+ android:gravity="center_vertical"
+ android:textColor="?attr/call_log_primary_text_color"
+ android:textSize="18sp"
+ android:singleLine="true"
+ />
+ <ImageButton
+ android:id="@+id/main_action_push_layer"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_alignLeft="@id/contact_background_sizer"
+ android:layout_alignTop="@id/contact_background_sizer"
+ android:layout_alignRight="@id/contact_background_sizer"
+ android:layout_alignBottom="@id/contact_background_sizer"
+ android:background="?android:attr/selectableItemBackground"
+ />
+ <FrameLayout android:id="@+id/call_and_sms_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/voicemail_container"
+ android:background="@android:color/black"
+ >
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/call_and_sms"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/call_log_list_item_height"
+ android:orientation="horizontal"
+ android:layout_marginTop="@dimen/call_log_icon_margin"
+ android:gravity="center_vertical"
+ android:background="@drawable/dialpad_background"
+ >
+
+ <LinearLayout android:id="@+id/call_and_sms_main_action"
+ android:layout_width="0dip"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:paddingLeft="@dimen/call_log_indent_margin"
+ android:orientation="vertical"
+ android:gravity="center_vertical"
+ android:focusable="true"
+ android:background="@drawable/btn_dial"
+ >
+
+ <TextView android:id="@+id/call_and_sms_text1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ />
+
+ <LinearLayout android:id="@+id/call_and_sms_line2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ >
+ <TextView android:id="@+id/call_and_sms_label"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="5dip"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold"
+ />
+
+ <TextView android:id="@+id/call_and_sms_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ />
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <View android:id="@+id/call_and_sms_divider"
+ android:layout_width="1px"
+ android:layout_height="32dip"
+ android:background="@drawable/ic_divider_dashed_holo_dark"
+ android:layout_gravity="center_vertical"
+ />
+
+ <ImageView android:id="@+id/call_and_sms_icon"
+ android:layout_width="@color/call_log_voicemail_highlight_color"
+ android:layout_height="match_parent"
+ android:paddingLeft="@dimen/call_log_inner_margin"
+ android:paddingRight="@dimen/call_log_outer_margin"
+ android:gravity="center"
+ android:scaleType="centerInside"
+ android:focusable="true"
+ android:background="@drawable/btn_dial"
+ />
+ </LinearLayout>
+ </FrameLayout>
+ </RelativeLayout>
</RelativeLayout>
diff --git a/res/layout/call_detail_history_header.xml b/res/layout/call_detail_history_header.xml
new file mode 100644
index 0000000..7fd7556
--- /dev/null
+++ b/res/layout/call_detail_history_header.xml
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<!-- This layout is supposed to match the content of the controls in call_detail.xml -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <!-- Contact photo. -->
+ <view
+ class="com.android.contacts.widget.ProportionalLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_below="@id/voicemail_status"
+ ex:ratio="0.5"
+ ex:direction="widthToHeight"
+ >
+ <!-- Proportional layout requires a view in it. -->
+ <View
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+ </view>
+ <!-- Separator line -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ />
+ <!-- Voicemail controls -->
+ <!-- TODO: Make the height be based on a constant. -->
+ <View
+ android:id="@+id/header_voicemail_container"
+ android:layout_width="match_parent"
+ android:layout_height="142dip"
+ android:layout_marginBottom="@dimen/call_log_icon_margin"
+ />
+ <!-- Call and SMS -->
+ <View
+ android:id="@+id/header_call_and_sms_container"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/call_log_list_item_height"
+ />
+
+</LinearLayout>
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index ccfa01d..e292f39 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -24,8 +24,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
- android:paddingTop="12dip"
- android:paddingBottom="12dip"
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip"
android:minHeight="@dimen/detail_min_line_item_height">
<!-- Note: padding might be controlled programatically -->
diff --git a/res/layout/contact_detail_list_padding.xml b/res/layout/contact_detail_list_padding.xml
new file mode 100644
index 0000000..8095731
--- /dev/null
+++ b/res/layout/contact_detail_list_padding.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<!-- The actual padding is embedded in a FrameLayout since we cannot change the
+ visibility of a header view in a ListView without having a parent view. -->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <View
+ android:id="@+id/contact_detail_list_padding"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/contact_browser_list_top_margin" />
+</FrameLayout>
+
diff --git a/res/layout/contact_detail_updates_fragment.xml b/res/layout/contact_detail_updates_fragment.xml
index 2393ace..a949cd8 100644
--- a/res/layout/contact_detail_updates_fragment.xml
+++ b/res/layout/contact_detail_updates_fragment.xml
@@ -14,17 +14,11 @@
limitations under the License.
-->
-<FrameLayout
+<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:id="@+id/contact_detail_updates_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <ListView android:id="@android:id/list"
+ android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_social_updates"
android:divider="@null"/>
-
-</FrameLayout>
diff --git a/res/layout/contact_picker.xml b/res/layout/contact_picker.xml
index c3fe2fa..96bf334 100644
--- a/res/layout/contact_picker.xml
+++ b/res/layout/contact_picker.xml
@@ -18,8 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
class="com.android.contacts.widget.FullHeightLinearLayout"
style="@style/ContactPickerLayout"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
android:orientation="vertical"
android:layout_height="match_parent">
<view
@@ -27,18 +25,18 @@
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_marginBottom="10dip"
+ android:layout_marginLeft="0dip"
+ android:layout_marginRight="32dip"
android:iconifiedByDefault="false" />
+ <!-- will contain an appropriate contacts list -->
<FrameLayout
+ android:id="@+id/list_container"
android:layout_width="match_parent"
android:layout_height="0dip"
- android:layout_weight="1"
- android:id="@+id/list_container">
- </FrameLayout>
+ android:layout_weight="1" />
<View
+ android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginLeft="16dip"
@@ -48,7 +46,9 @@
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
<Button
style="?android:attr/buttonBarButtonStyle"
android:id="@+id/cancel"
diff --git a/res/layout/contact_picker_content.xml b/res/layout/contact_picker_content.xml
index 6792f9c..c30add7 100644
--- a/res/layout/contact_picker_content.xml
+++ b/res/layout/contact_picker_content.xml
@@ -26,6 +26,8 @@
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="0dip"
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right"
android:fastScrollEnabled="true"
android:layout_weight="1" />
diff --git a/res/layout/contacts_list_content.xml b/res/layout/contacts_list_content.xml
index f98d751..66c3936 100644
--- a/res/layout/contacts_list_content.xml
+++ b/res/layout/contacts_list_content.xml
@@ -22,17 +22,19 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pinned_header_list_layout"
- android:paddingTop="@dimen/contact_browser_list_top_margin"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
- <!-- Shown only when an Account filter is set. -->
+ <!-- Shown only when an Account filter is set.
+ - paddingTop should be here to show "shade" effect correctly. -->
<LinearLayout
android:id="@+id/account_filter_header_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:minHeight="?attr/list_item_header_height"
android:orientation="vertical"
+ android:paddingTop="@dimen/contact_browser_list_top_margin"
android:layout_marginLeft="@dimen/contact_browser_list_header_left_margin"
android:layout_marginRight="@dimen/contact_browser_list_header_right_margin"
android:visibility="gone">
@@ -40,11 +42,9 @@
android:id="@+id/account_filter_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="@dimen/contact_filter_header_min_height"
android:singleLine="true"
android:ellipsize="end"
android:textStyle="bold"
- android:gravity="left|center_vertical"
android:textAllCaps="true"
android:paddingLeft="@dimen/contact_browser_list_item_text_indent"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -59,9 +59,9 @@
class="com.android.contacts.list.ContactEntryListView"
android:id="@android:id/list"
android:layout_width="match_parent"
- android:layout_height="0dip"
- android:layout_marginLeft="@dimen/contact_browser_list_left_margin"
- android:layout_marginRight="@dimen/contact_browser_list_right_margin"
+ android:layout_height="0dip"
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right"
android:fastScrollEnabled="true"
android:layout_weight="1" />
diff --git a/res/layout/directory_header.xml b/res/layout/directory_header.xml
index af0b5bd..6043c7b 100644
--- a/res/layout/directory_header.xml
+++ b/res/layout/directory_header.xml
@@ -19,12 +19,14 @@
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/DirectoryHeader"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/list_item_header_height"
+ android:paddingLeft="?attr/list_item_padding_left"
+ android:paddingRight="?attr/list_item_padding_right">
<TextView
android:id="@+id/display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:minHeight="@dimen/directory_header_height"
android:layout_toRightOf="@+id/label"
android:layout_toLeftOf="@+id/count"
android:layout_centerVertical="true"
@@ -32,7 +34,9 @@
android:layout_marginRight="8dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorSecondary"
- android:singleLine="true" />
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:textAllCaps="true" />
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
@@ -41,16 +45,19 @@
android:layout_alignBaseline="@id/display_name"
android:layout_marginLeft="8dip"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary" />
+ android:textColor="?android:attr/textColorSecondary"
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:textAllCaps="true" />
<TextView
android:id="@+id/count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
- android:layout_marginRight="8dip"
android:layout_alignBaseline="@id/display_name"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary" />
+ android:singleLine="true"
+ android:textSize="12sp"
+ android:textColor="@color/contact_count_text_color" />
<View
android:id="@+id/contact_filter_header_bottom_divider"
style="@style/SectionDivider"
diff --git a/res/layout/group_browse_list_account_header.xml b/res/layout/group_browse_list_account_header.xml
index f739ea2..b1d873d 100644
--- a/res/layout/group_browse_list_account_header.xml
+++ b/res/layout/group_browse_list_account_header.xml
@@ -18,54 +18,43 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/list_background_holo"
- android:paddingLeft="@dimen/group_list_header_padding"
- android:paddingRight="@dimen/group_list_header_padding"
- android:paddingTop="@dimen/group_list_header_padding"
+ android:minHeight="?attr/list_item_header_height"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="?attr/list_item_header_text_indent"
android:orientation="horizontal">
<TextView
android:id="@+id/account_type"
- android:layout_width="wrap_content"
+ android:layout_width="0px"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:layout_weight="1"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/people_app_theme_color"
android:textStyle="bold"
android:textAllCaps="true"
android:singleLine="true"/>
+ <!-- TODO: Shold use correct color with a correct name (content should be same).
+ can use "?android:attr/textColorTertiary" -->
<TextView
android:id="@+id/account_name"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginLeft="@dimen/group_list_header_padding"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:singleLine="true"
- android:ellipsize="middle"
- android:textColor="@color/people_app_theme_color"/>
-
- <TextView
- android:id="@+id/group_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:gravity="right"
- android:singleLine="true"
- android:layout_marginLeft="@dimen/group_list_header_padding"
+ android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorTertiary"/>
-
+ android:textColor="@color/contact_count_text_color"
+ android:textSize="12sp"
+ android:singleLine="true"
+ android:ellipsize="middle" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dip"
- android:layout_marginTop="@dimen/group_list_header_padding"
- android:background="@color/people_app_theme_color"/>
+ android:background="@color/people_app_theme_color" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/layout/group_browse_list_fragment.xml b/res/layout/group_browse_list_fragment.xml
index 9e6bd27..6e82e8f 100644
--- a/res/layout/group_browse_list_fragment.xml
+++ b/res/layout/group_browse_list_fragment.xml
@@ -25,20 +25,23 @@
class="com.android.contacts.widget.AutoScrollListView"
android:layout_width="match_parent"
android:layout_height="0dip"
- android:fastScrollEnabled="true"
+ android:paddingTop="@dimen/contact_browser_list_top_margin"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
android:scrollbarStyle="outsideOverlay"
android:layout_weight="1"
android:cacheColorHint="@android:color/transparent"
android:divider="@null" />
<TextView
- android:id="@+id/empty"
- android:layout_marginTop="@dimen/empty_message_top_margin"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:text="@string/noGroups" />
+ android:id="@+id/empty"
+ android:layout_marginTop="@dimen/empty_message_top_margin"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dip"
+ android:gravity="center_horizontal"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:text="@string/noGroups" />
<LinearLayout
android:id="@+id/add_accounts"
diff --git a/res/layout/group_browse_list_item.xml b/res/layout/group_browse_list_item.xml
index 326b413..599cc13 100644
--- a/res/layout/group_browse_list_item.xml
+++ b/res/layout/group_browse_list_item.xml
@@ -19,35 +19,33 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="@dimen/detail_min_line_item_height">
+ android:paddingLeft="?attr/list_item_padding_left"
+ android:paddingTop="?attr/list_item_padding_top"
+ android:paddingRight="?attr/list_item_padding_right"
+ android:paddingBottom="?attr/list_item_padding_bottom"
+ android:minHeight="@dimen/detail_min_line_item_height" >
- <ImageView
+ <View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dip"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
- android:scaleType="fitXY"
- android:src="@color/people_app_theme_color"/>
+ android:background="?android:attr/listDivider" />
<include
android:id="@+id/group_list_header"
layout="@layout/group_browse_list_account_header"
- android:paddingRight="20dip"
- android:paddingBottom="10dip"
android:visibility="gone" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="10dip"
- android:paddingRight="20dip"
- android:paddingBottom="10dip"
- style="@style/GroupBrowseListItem">
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="?attr/list_item_text_indent"
android:orientation="vertical"
android:layout_toLeftOf="@+id/icons"
android:layout_alignParentLeft="true"
@@ -57,8 +55,6 @@
android:id="@+id/label"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:ellipsize="end"
android:singleLine="true" />
@@ -67,8 +63,6 @@
android:id="@+id/count"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorTertiary"
android:ellipsize="end"
diff --git a/res/layout/join_contact_picker.xml b/res/layout/join_contact_picker.xml
index 20a7740..ffea137 100644
--- a/res/layout/join_contact_picker.xml
+++ b/res/layout/join_contact_picker.xml
@@ -24,20 +24,22 @@
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
- android:id="@+id/list_container">
- </FrameLayout>
+ android:id="@+id/list_container" />
<View
+ android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dip"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="16dip"
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right"
android:background="?android:attr/dividerHorizontal" />
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right">
<Button
style="?android:attr/buttonBarButtonStyle"
android:id="@+id/cancel"
diff --git a/res/layout/join_contact_picker_list_content.xml b/res/layout/join_contact_picker_list_content.xml
index 0d2a089..9e72c31 100644
--- a/res/layout/join_contact_picker_list_content.xml
+++ b/res/layout/join_contact_picker_list_content.xml
@@ -19,33 +19,30 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:paddingTop="8dip"
android:orientation="vertical">
<TextView
android:id="@+id/join_contact_blurb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="10dip"
- android:paddingTop="12dip"
- android:paddingBottom="12dip"
- android:layout_marginLeft="12dip"
- android:layout_marginRight="12dip"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
android:maxLines="2"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary" />
+ android:textAppearance="?android:attr/textAppearanceMedium" />
<FrameLayout
android:id="@+id/pinned_header_list_layout"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginLeft="48dip"
- android:layout_marginRight="48dip">
-
+ android:layout_height="match_parent">
<view
class="com.android.contacts.list.ContactEntryListView"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fastScrollEnabled="true" />
+ android:layout_marginLeft="?attr/contact_browser_list_padding_left"
+ android:layout_marginRight="?attr/contact_browser_list_padding_right"
+ android:fastScrollEnabled="true"
+ android:scrollbarStyle="outsideOverlay" />
</FrameLayout>
</LinearLayout>
diff --git a/res/layout/join_contact_picker_section.xml b/res/layout/join_contact_picker_section.xml
index 95ec107..260ea2d 100644
--- a/res/layout/join_contact_picker_section.xml
+++ b/res/layout/join_contact_picker_section.xml
@@ -22,12 +22,12 @@
<TextView
android:id="@+id/text"
- android:layout_height="32dip"
android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="?attr/list_item_header_text_indent"
+ android:minHeight="16dip"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"
android:gravity="center_vertical" />
- <View
- style="@style/SectionDivider" />
+ <View style="@style/SectionDivider" />
</LinearLayout>
diff --git a/res/layout/social_widget.xml b/res/layout/social_widget.xml
index ddcd995..e9847f9 100644
--- a/res/layout/social_widget.xml
+++ b/res/layout/social_widget.xml
@@ -48,14 +48,14 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/bg_status_contact_widget"
- android:layout_marginTop="4dip"
+ android:layout_marginTop="@dimen/widget_snippet_top_margin"
android:layout_marginRight="16dip"
- android:layout_marginBottom="7dip"
+ android:layout_marginBottom="@dimen/widget_snippet_bottom_margin"
android:layout_marginLeft="0dip"
android:paddingLeft="47dip"
android:paddingRight="8dip"
- android:paddingTop="3dip"
- android:paddingBottom="6dip">
+ android:paddingTop="@dimen/widget_snippet_top_padding"
+ android:paddingBottom="@dimen/widget_snippet_bottom_padding">
<TextView
android:id="@+id/name_and_snippet"
@@ -75,17 +75,6 @@
android:gravity="center"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/widget_text_size_name" />
-
- <TextView
- android:id="@+id/status_date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
- android:background="@drawable/statusbox_attribute_holo"
- android:textSize="13sp"
- android:textColor="#FF444444"
- android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/updates_title.xml b/res/layout/updates_title.xml
new file mode 100644
index 0000000..4b706cc
--- /dev/null
+++ b/res/layout/updates_title.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:paddingRight="@dimen/detail_item_side_margin"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="24dip"
+ android:text="@string/recent_updates"
+ android:textColor="@color/detail_kind_title_color"
+ android:textStyle="bold"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:paddingLeft="8dip"
+ android:paddingTop="5dip"
+ android:paddingBottom="2dip" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="2dip"
+ android:background="@color/detail_kind_title_color"/>
+
+</LinearLayout>
diff --git a/res/layout/user_profile_button.xml b/res/layout/user_profile_button.xml
index 4937d7b..8735f5a 100644
--- a/res/layout/user_profile_button.xml
+++ b/res/layout/user_profile_button.xml
@@ -18,11 +18,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:minHeight="@dimen/contact_browser_list_item_photo_size"
+ android:layout_marginLeft="?attr/list_item_padding_left"
+ android:layout_marginRight="?attr/list_item_padding_right"
+ android:paddingLeft="?attr/list_item_header_text_indent"
android:background="?android:attr/selectableItemBackground"
android:singleLine="true"
android:text="@string/profile_display_name"
android:ellipsize="end"
- android:minHeight="@dimen/contact_browser_list_item_photo_size"
android:gravity="left|center_vertical"
- android:paddingLeft="@dimen/contact_browser_list_item_text_indent"
android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/res/layout/user_profile_header.xml b/res/layout/user_profile_header.xml
index 7c82ea4..ff01a11 100644
--- a/res/layout/user_profile_header.xml
+++ b/res/layout/user_profile_header.xml
@@ -16,15 +16,19 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:paddingTop="@dimen/contact_browser_list_top_margin"
+ android:id="@+id/user_profile_header"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="wrap_content" >
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/list_item_header_height"
+ android:paddingTop="@dimen/contact_browser_list_top_margin"
+ android:paddingLeft="?attr/list_item_padding_left"
+ android:paddingRight="?attr/list_item_padding_right" >
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
- android:layout_height="wrap_content" >
+ android:layout_height="wrap_content">
<TextView
android:id="@+id/profile_title"
@@ -37,7 +41,7 @@
android:gravity="left|center_vertical"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:paddingLeft="@dimen/contact_browser_list_item_text_indent"
+ android:paddingLeft="?attr/list_item_text_indent"
android:textColor="@color/people_app_theme_color" />
<TextView
@@ -55,6 +59,6 @@
<View
android:background="@color/people_app_theme_color"
android:layout_width="match_parent"
- android:layout_height="1dip" />
+ android:layout_height="?attr/list_item_header_underline_height" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/res/menu/call_log_options.xml b/res/menu/call_log_options.xml
index b50869a..c62be77 100644
--- a/res/menu/call_log_options.xml
+++ b/res/menu/call_log_options.xml
@@ -26,6 +26,11 @@
android:showAsAction="withText" />
<item
+ android:id="@+id/show_all_calls"
+ android:title="@string/menu_show_all_calls"
+ android:showAsAction="withText" />
+
+ <item
android:id="@+id/menu_call_settings_call_log"
android:title="@string/call_settings"
android:icon="@drawable/ic_menu_settings_holo_light"
diff --git a/res/values-sw580dp-w1000dp/styles.xml b/res/values-sw580dp-w1000dp/styles.xml
deleted file mode 100644
index 85f4733..0000000
--- a/res/values-sw580dp-w1000dp/styles.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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.
--->
-<resources>
- <style name="FavoritesFragmentStyle">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">7</item>
- </style>
-
- <style name="FrequentFragmentStyle">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">3</item>
- </style>
-</resources>
diff --git a/res/values-sw580dp-w720dp/styles.xml b/res/values-sw580dp-w720dp/styles.xml
index ff50d45..4314c80 100644
--- a/res/values-sw580dp-w720dp/styles.xml
+++ b/res/values-sw580dp-w720dp/styles.xml
@@ -37,10 +37,16 @@
<item name="list_item_prefix_highlight_color">#729a27</item>
<item name="list_item_header_text_indent">8dip</item>
<item name="list_item_header_text_color">@color/people_app_theme_color</item>
- <item name="list_item_header_height">26dip</item>
+ <item name="list_item_header_height">24dip</item>
<item name="list_item_header_text_size">14sp</item>
<item name="list_item_header_underline_color">@color/people_app_theme_color</item>
+ <item name="list_item_header_underline_height">1dip</item>
+ <item name="list_item_contacts_count_text_color">@color/contact_count_text_color</item>
+ <item name="list_item_contacts_count_text_size">12sp</item>
<item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">0dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
+ <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
<!-- Favorites -->
<item name="favorites_padding_bottom">0dip</item>
</style>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index 91842d6..42a8314 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -42,7 +42,11 @@
<dimen name="contact_browser_list_top_margin">16dip</dimen>
<dimen name="contact_browser_list_header_left_margin">@dimen/list_visible_scrollbar_padding</dimen>
<dimen name="contact_browser_list_header_right_margin">24dip</dimen>
- <dimen name="contact_browser_list_left_margin">0dip</dimen>
- <dimen name="contact_browser_list_right_margin">0dip</dimen>
<dimen name="list_visible_scrollbar_padding">48dip</dimen>
+
+ <!-- Margins and padding for text in widget -->
+ <dimen name="widget_snippet_top_margin">5dip</dimen>
+ <dimen name="widget_snippet_bottom_margin">6dip</dimen>
+ <dimen name="widget_snippet_top_padding">6dip</dimen>
+ <dimen name="widget_snippet_bottom_padding">3dip</dimen>
</resources>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index a386e57..efbbde2 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -19,7 +19,7 @@
<item name="android:actionBarTabStyle">@style/ContactsActionBarTabView</item>
<item name="android:textColorPrimary">@color/primary_text_color</item>
<item name="android:textColorSecondary">@color/secondary_text_color</item>
- <item name="list_item_height">66dip</item>
+ <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>
<item name="list_item_divider">?android:attr/listDivider</item>
@@ -40,29 +40,51 @@
<item name="list_item_header_text_color">@color/people_app_theme_color</item>
<item name="list_item_header_height">26dip</item>
<item name="list_item_header_underline_color">@color/people_app_theme_color</item>
+ <item name="list_item_header_underline_height">1dip</item>
+ <item name="list_item_contacts_count_text_color">@color/contact_count_text_color</item>
+ <item name="list_item_contacts_count_text_size">12sp</item>
<item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">0dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
+ <item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
<!-- Favorites -->
<item name="favorites_padding_bottom">0dip</item>
</style>
<style name="ContactPickerTheme" parent="@android:Theme.Holo.Light.Dialog">
- <item name="list_item_height">66dip</item>
+ <item name="list_item_height">?android:attr/listPreferredItemHeight</item>
<item name="section_header_background">@drawable/list_title_holo</item>
<item name="list_item_divider">?android:attr/listDivider</item>
<item name="list_item_padding_top">0dip</item>
- <item name="list_item_padding_right">24dip</item>
+ <item name="list_item_padding_right">0dip</item>
<item name="list_item_padding_bottom">0dip</item>
<item name="list_item_padding_left">0dip</item>
- <item name="list_item_gap_between_image_and_text">16dip</item>
+ <item name="list_item_gap_between_image_and_text">8dip</item>
<item name="list_item_gap_between_label_and_data">5dip</item>
<item name="list_item_call_button_padding">14dip</item>
<item name="list_item_vertical_divider_margin">5dip</item>
- <item name="list_item_presence_icon_margin">30dip</item>
+ <item name="list_item_presence_icon_margin">18dip</item>
<item name="list_item_photo_size">64dip</item>
<item name="list_item_profile_photo_size">80dip</item>
- <item name="list_item_header_text_indent">77dip</item>
- <item name="list_item_header_text_color">?color/section_header_text_color</item>
+ <item name="list_item_header_text_indent">8dip</item>
<item name="list_item_header_text_size">14sp</item>
+ <item name="list_item_header_text_color">@color/people_app_theme_color</item>
+ <item name="list_item_header_height">24dip</item>
+ <item name="list_item_header_underline_color">@color/people_app_theme_color</item>
+ <item name="list_item_header_underline_height">1dip</item>
+ <item name="list_item_contacts_count_text_color">@color/contact_count_text_color</item>
+ <item name="list_item_contacts_count_text_size">12sp</item>
+ <item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">16dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
+ </style>
+ <style name="ContactPickerLayout" parent="ContactPickerTheme">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">480dip</item>
+ </style>
+ <style name="JoinContactActivityTheme" parent="ContactPickerTheme" >
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">480dip</item>
</style>
<style name="ContactListFilterTheme" parent="@android:Theme.Holo.Light.Dialog">
@@ -74,11 +96,6 @@
<item name="android:layout_height">400dip</item>
</style>
- <style name="ContactPickerLayout" parent="ContactPickerTheme">
- <item name="android:layout_width">480dip</item>
- <item name="android:layout_height">match_parent</item>
- </style>
-
<style name="ContactDetailActivityTheme" parent="@android:Theme.Dialog">
<item name="android:windowContentOverlay">@null</item>
</style>
@@ -86,7 +103,7 @@
<style name="DirectoryHeader" parent="PeopleTheme">
<item name="android:paddingTop">0dip</item>
<item name="android:paddingBottom">0dip</item>
- <item name="android:background">@drawable/directory_bg_holo</item>
+ <item name="android:background">@android:color/transparent</item>
</style>
<style name="NonPhoneDialogTheme" parent="@android:Theme.Holo.Light.Dialog">
@@ -102,8 +119,4 @@
<item name="android:windowNoDisplay">true</item>
<item name="android:windowIsFloating">true</item>
</style>
-
- <style name="GroupBrowseListItem">
- <item name="android:background">@drawable/list_item_activated_background</item>
- </style>
</resources>
diff --git a/res/values-w470dp/strings.xml b/res/values-w470dp/strings.xml
index 8dc9c09..17934d7 100644
--- a/res/values-w470dp/strings.xml
+++ b/res/values-w470dp/strings.xml
@@ -14,5 +14,5 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="recent_updates">Updates</string>
-</resources>
\ No newline at end of file
+ <string name="recent_updates">Recent updates</string>
+</resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 0f7b62d..7bec43a 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -68,6 +68,8 @@
<declare-styleable name="ContactBrowser">
<attr name="contact_filter_popup_width" format="dimension"/>
+ <attr name="contact_browser_list_padding_left" format="dimension"/>
+ <attr name="contact_browser_list_padding_right" format="dimension"/>
</declare-styleable>
<declare-styleable name="ContactListItemView">
diff --git a/res/values/colors.xml b/res/values/colors.xml
index a277124..1e47948 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -87,7 +87,6 @@
<color name="dialtacts_secondary_text_color">#888888</color>
<!-- Colors in the contact browser list -->
- <color name="contact_browser_list_bk_color">#EEEEEE</color>
<color name="contact_count_text_color">#AAAAAA</color>
<!-- Color of the text of the tab carousel in the contact details -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 69441fd..81b962f 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -163,6 +163,12 @@
<!-- Font size used for the social status in the widget -->
<dimen name="widget_text_size_snippet">13sp</dimen>
+ <!-- Margins and padding for text in widget -->
+ <dimen name="widget_snippet_top_margin">4dip</dimen>
+ <dimen name="widget_snippet_bottom_margin">7dip</dimen>
+ <dimen name="widget_snippet_top_padding">3dip</dimen>
+ <dimen name="widget_snippet_bottom_padding">6dip</dimen>
+
<!-- Minimum width of the filter selector in the action bar -->
<dimen name="action_bar_filter_min_width">100dip</dimen>
@@ -210,8 +216,6 @@
<!-- contact browser list margins -->
<dimen name="contact_browser_list_header_left_margin">16dip</dimen>
<dimen name="contact_browser_list_header_right_margin">@dimen/list_visible_scrollbar_padding</dimen>
- <dimen name="contact_browser_list_left_margin">16dip</dimen>
- <dimen name="contact_browser_list_right_margin">0dip</dimen>
<dimen name="contact_browser_list_item_photo_size">64dip</dimen>
<dimen name="contact_browser_list_item_text_indent">8dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index eaf6ab8..b7a1868 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -143,13 +143,11 @@
<!-- Menu item (in the action bar) that creates a new group [CHAR LIMIT=12] -->
<string name="menu_new_group_action_bar">New</string>
- <!-- Title of the confirmation dialog for separating contacts into multiple instances -->
- <string name="splitConfirmation_title">Separate Contact</string>
+ <!-- Title of the confirmation dialog for separating contacts into multiple instances [CHAR LIMIT=20] -->
+ <string name="splitConfirmation_title">Separate contact</string>
- <!-- Confirmation dialog for separating contacts into multiple instances -->
- <string name="splitConfirmation">Are you sure you want to separate this single contact
- into multiple contacts: one for each set of contact information that was joined into it?
- </string>
+ <!-- Confirmation dialog for separating contacts into multiple instances [CHAR LIMIT=NONE] -->
+ <string name="splitConfirmation">Are you sure you want to separate this single contact into multiple contacts?</string>
<!-- Menu item that joins an aggregate with another aggregate -->
<string name="menu_joinAggregate">Join</string>
@@ -314,14 +312,14 @@
<!-- Displayed in a spinner dialog as user changes to display options are saved -->
<string name="savingDisplayGroups">Saving display options\u2026</string>
- <!-- Toast displayed when a contact is saved -->
- <string name="contactSavedToast">Contact saved.</string>
+ <!-- Toast displayed when a contact is saved [CHAR LIMIT=NONE] -->
+ <string name="contactSavedToast">Contact saved</string>
<!-- Toast displayed when saving a contact failed -->
<string name="contactSavedErrorToast">Error, unable to save contact changes.</string>
<!-- Toast displayed when a group is saved [CHAR LIMIT=NONE] -->
- <string name="groupSavedToast">Group saved.</string>
+ <string name="groupSavedToast">Group saved</string>
<!-- Toast displayed when saving a group failed [CHAR LIMIT=NONE] -->
<string name="groupSavedErrorToast">Error, unable to save group changes.</string>
@@ -903,8 +901,8 @@
<!-- Dialog title shown when a user confirms whether he/she export Contact data -->
<string name="confirm_export_title">Confirm export</string>
- <!-- Dialog message shown when a user confirms whether he/she export Contact data -->
- <string name="confirm_export_message">Are you sure you want to export your contact list to \"<xliff:g id="vcard_filename">%s</xliff:g>\"?</string>
+ <!-- Dialog message shown when a user confirms whether he/she export Contact data [CHAR LIMIT=NONE] -->
+ <string name="confirm_export_message">Export your contact list to file \"<xliff:g id="vcard_filename">%s</xliff:g>\"?</string>
<!-- Dialog title shown when exporting Contact data failed -->
<string name="exporting_contact_failed_title">Failed to export contact data</string>
@@ -1051,7 +1049,7 @@
<!-- Header that expands to list all website types when editing a website of a contact [CHAR LIMIT=20] -->
<string name="websiteLabelsGroup">Website</string>
<!-- Header that expands to list all event types when editing an event of a contact [CHAR LIMIT=20] -->
- <string name="eventLabelsGroup">Event</string>
+ <string name="eventLabelsGroup">Events</string>
<!-- Header for the list of all relationships for a contact [CHAR LIMIT=20] -->
<string name="relationLabelsGroup">Relationship</string>
<!-- Header for the list of all groups for a contact [CHAR LIMIT=20] -->
@@ -1265,14 +1263,17 @@
<string name="name_phonetic">Phonetic name</string>
<!-- Title for the list of all contact details that come from third-party sources (including a corporate directory) [CHAR LIMIT=20] -->
- <string name="network">Network</string>
+ <string name="connections">Connections</string>
- <!-- Label of the button to open the "more networks" popup where the user can invite a contact to other social networks or services [CHAR LIMIT=32] -->
- <string name="more_networks_button">More networks</string>
+ <!-- Label of the button to open the "add connection" popup where the user can invite a contact to other social networks or services [CHAR LIMIT=32] -->
+ <string name="add_connection_button">Add connection</string>
<!-- Section title for the page containing the contact's social updates on the contact card [CHAR LIMIT=20]-->
<string name="recent_updates">Recent</string>
+ <!-- Label that contains the social update from a contact on the contact card. The text should appear as a quotation. [CHAR LIMIT=5] -->
+ <string name="recent_updates_tab_text">\"<xliff:g id="update_text">%s</xliff:g>\"</string>
+
<!-- String describing which account type a contact came from when editing it -->
<string name="account_type_format"><xliff:g id="source" example="Gmail">%1$s</xliff:g> contact</string>
@@ -1379,6 +1380,12 @@
<!-- The button to add an organization field to a contact in the Raw Contact Editor [CHAR LIMIT=22] -->
<string name="add_organization">Add organization</string>
+ <!-- The button to add an organization field to a contact in the Raw Contact Editor [CHAR LIMIT=12] -->
+ <string name="event_edit_field_hint_text">Date</string>
+
+ <!-- The button to add an organization field to a contact in the Raw Contact Editor [CHAR LIMIT=15] -->
+ <string name="group_edit_field_hint_text">Group name</string>
+
<!-- Attbution of a contact status update, when the time of update is unknown -->
<string name="contact_status_update_attribution">via <xliff:g id="source" example="Google Talk">%1$s</xliff:g></string>
@@ -1438,7 +1445,7 @@
<string name="directory_search_label">Directory</string>
<!-- The label in section header in the contact list for a local contacts [CHAR LIMIT=128] -->
- <string name="local_search_label">Contacts</string>
+ <string name="local_search_label">All contacts</string>
<!-- Toast shown when creating a personal copy of a contact [CHAR LIMIT=100] -->
<string name="toast_making_personal_copy">Creating a personal copy</string>
@@ -1474,7 +1481,7 @@
<string name="activity_title_contacts_filter">Contacts to display</string>
<!-- Menu item for the settings activity [CHAR LIMIT=64] -->
- <string name="menu_settings">Display Options</string>
+ <string name="menu_settings">Display options</string>
<!-- The preference section title for contact display options [CHAR LIMIT=128] -->
<string name="preference_displayOptions">Display options</string>
@@ -1492,6 +1499,9 @@
<!-- Button to add a phone number to contacts [CHAR LIMIT=25] -->
<string name="non_phone_add_to_contacts">Add to contacts</string>
+ <!-- Title of the activity that allows the user to confirm the addition of a detail to 1 existing contact [CHAR LIMIT=25] -->
+ <string name="activity_title_confirm_add_detail">Add to contact</string>
+
<!-- Button to close without add a phone number to contacts [CHAR LIMIT=25] -->
<string name="non_phone_close">Close</string>
@@ -1595,7 +1605,7 @@
<string name="profile_display_name">Set up my profile</string>
<!-- Label to instruct the user to type in a contact's name to add the contact as a member of the current group. [CHAR LIMIT=64] -->
- <string name="enter_contact_name">Enter contact\'s name</string>
+ <string name="enter_contact_name">Type person\'s name</string>
<!-- Button to view the updates from the current group on the group detail page [CHAR LIMIT=20] -->
<string name="view_updates_from_group">View updates</string>
@@ -1676,6 +1686,9 @@
<!-- Menu item used to show only voicemails in the call log. [CHAR LIMIT=30] -->
<string name="menu_show_voicemails_only">Show voicemails only</string>
+ <!-- Menu item used to show all calls in the call log. [CHAR LIMIT=30] -->
+ <string name="menu_show_all_calls">Show all calls</string>
+
<!-- Used to display as default status when the contact is available for chat [CHAR LIMIT=19] -->
<string name="status_available">Available</string>
@@ -1771,6 +1784,12 @@
<!-- String describing the text on the header of the profile contact in the contacts list [CHAR LIMIT=20] -->
<string name="user_profile_contacts_list_header">ME</string>
+ <!-- Header label in the contact editor for a profile that is local to the device only (and not associated with any account) [CHAR LIMIT=25] -->
+ <string name="local_profile_title">My local profile</string>
+
+ <!-- Header label in the contact editor for a profile that comes from an external third-party app whose name is given by source [CHAR LIMIT=20] -->
+ <string name="external_profile_title">My <xliff:g id="external_source">%1$s</xliff:g> profile</string>
+
<!-- Toast shown when the app starts showing all contacts regardless of its current
contact filter state. [CHAR LIMIT=64] -->
<string name="toast_displaying_all_contacts">Displaying all contacts</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index e6cad61..84c3d15 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -42,9 +42,11 @@
<item name="list_item_header_text_color">@color/people_app_theme_color</item>
<item name="list_item_header_text_size">12sp</item>
<item name="list_item_header_height">24dip</item>
- <item name="list_item_header_underline_height">1px</item>
+ <item name="list_item_header_underline_height">1dip</item>
<item name="list_item_header_underline_color">@color/people_app_theme_color</item>
<item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">16dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
<item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
<!-- CallLog -->
<item name="call_log_primary_text_color">#FFFFFF</item>
@@ -144,17 +146,18 @@
<item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
<item name="list_item_profile_photo_size">70dip</item>
<item name="list_item_prefix_highlight_color">#729a27</item>
- <item name="list_item_header_text_indent">@dimen/contact_browser_list_item_text_indent</item>
<item name="list_item_header_text_color">@color/people_app_theme_color</item>
<item name="list_item_header_text_size">14dip</item>
<item name="list_item_header_height">26dip</item>
<item name="list_item_header_underline_height">1dip</item>
<item name="list_item_header_underline_color">@color/people_app_theme_color</item>
<item name="list_item_contacts_count_text_color">@color/contact_count_text_color</item>
+ <item name="list_item_header_text_indent">8dip</item>
<item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">16dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
<item name="list_item_text_indent">@dimen/contact_browser_list_item_text_indent</item>
- <item name="list_item_contacts_count_text_size">12dip</item>
- list_item_contacts_count_text_size
+ <item name="list_item_contacts_count_text_size">12sp</item>
<!-- Favorites -->
<item name="favorites_padding_bottom">0dip</item>
</style>
@@ -190,30 +193,19 @@
<item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
<item name="list_item_profile_photo_size">70dip</item>
<item name="list_item_prefix_highlight_color">#729a27</item>
- <item name="list_item_header_text_indent">56dip</item>
<item name="list_item_header_text_color">?color/section_header_text_color</item>
<item name="list_item_header_text_size">14sp</item>
+ <item name="list_item_header_text_indent">8dip</item>
<item name="contact_filter_popup_width">320dip</item>
+ <item name="contact_browser_list_padding_left">16dip</item>
+ <item name="contact_browser_list_padding_right">0dip</item>
</style>
- <style name="ContactPickerTheme" parent="@android:Theme.Holo.Light">
- <item name="section_header_background">@drawable/section_header</item>
- <item name="list_item_divider">?android:attr/listDivider</item>
- <item name="list_item_padding_top">4dip</item>
- <item name="list_item_padding_right">11dip</item>
- <item name="list_item_padding_bottom">4dip</item>
- <item name="list_item_padding_left">4dip</item>
- <item name="list_item_gap_between_image_and_text">8dip</item>
- <item name="list_item_gap_between_label_and_data">5dip</item>
- <item name="list_item_call_button_padding">14dip</item>
- <item name="list_item_vertical_divider_margin">5dip</item>
- <item name="list_item_presence_icon_margin">5dip</item>
- <item name="list_item_photo_size">@dimen/contact_browser_list_item_photo_size</item>
- <item name="list_item_profile_photo_size">70dip</item>
- <item name="list_item_prefix_highlight_color">#729a27</item>
- <item name="list_item_header_text_indent">56dip</item>
- <item name="list_item_header_text_color">?color/section_header_text_color</item>
- <item name="list_item_header_text_size">14sp</item>
+ <style name="ContactPickerTheme" parent="@style/PeopleTheme">
+ </style>
+ <style name="ContactPickerLayout" parent="ContactPickerTheme">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">match_parent</item>
</style>
<style name="JoinContactActivityTheme" parent="ContactPickerTheme" >
@@ -225,11 +217,6 @@
<style name="ContactListFilterTheme" parent="@android:Theme.Holo.Light">
</style>
- <style name="ContactPickerLayout" parent="ContactPickerTheme">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">match_parent</item>
- </style>
-
<style name="CustomContactListFilterView" parent="ContactListFilterTheme">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
@@ -247,7 +234,7 @@
<style name="SectionDivider">
<item name="android:background">#7e7e87</item>
- <item name="android:layout_height">2dip</item>
+ <item name="android:layout_height">1dip</item>
<item name="android:layout_width">match_parent</item>
</style>
@@ -264,9 +251,6 @@
<item name="android:layout_gravity">center_vertical</item>
</style>
- <style name="GroupBrowseListItem">
- </style>
-
<style name="DialtactsDigitsTextAppearance">
<item name="android:maxLines">1</item>
<item name="android:scrollHorizontally">true</item>
@@ -307,16 +291,6 @@
<item name="android:background">#7F000000</item>
</style>
- <style name="FavoritesFragmentStyle">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">1</item>
- </style>
-
- <style name="FrequentFragmentStyle">
- <item name="android:layout_width">0dip</item>
- <item name="android:layout_weight">1</item>
- </style>
-
<style name="DialtactsActionBarStyle" parent="android:Widget.Holo.ActionBar">
<item name="android:backgroundSplit">@drawable/ab_bottom_opaque_dark_holo</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_opaque_dark_holo</item>
diff --git a/src/com/android/contacts/BackScrollManager.java b/src/com/android/contacts/BackScrollManager.java
new file mode 100644
index 0000000..192b79e
--- /dev/null
+++ b/src/com/android/contacts/BackScrollManager.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+package com.android.contacts;
+
+import android.view.View;
+import android.widget.AbsListView;
+import android.widget.ListView;
+
+/**
+ * Handles scrolling back of a list tied to a header.
+ * <p>
+ * This is used to implement a header that scrolls up with the content of a list to be partially
+ * obscured.
+ */
+public class BackScrollManager {
+ /** Defines the header to be scrolled. */
+ public interface ScrollableHeader {
+ /** Sets the offset by which to scroll. */
+ public void setOffset(int offset);
+ /** Gets the maximum offset that should be applied to the header. */
+ public int getMaximumScrollableHeaderOffset();
+ }
+
+ private final ScrollableHeader mHeader;
+ private final ListView mListView;
+
+ private final AbsListView.OnScrollListener mScrollListener =
+ new AbsListView.OnScrollListener() {
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
+ int totalItemCount) {
+ if (firstVisibleItem != 0) {
+ // The first item is not shown, the header should be pinned at the top.
+ mHeader.setOffset(mHeader.getMaximumScrollableHeaderOffset());
+ return;
+ }
+
+ View firstVisibleItemView = view.getChildAt(firstVisibleItem);
+ if (firstVisibleItemView == null) {
+ return;
+ }
+ // We scroll the header up, but at most pin it to the top of the screen.
+ int offset = Math.min(
+ (int) -view.getChildAt(firstVisibleItem).getY(),
+ mHeader.getMaximumScrollableHeaderOffset());
+ mHeader.setOffset(offset);
+ }
+
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ // Nothing to do here.
+ }
+ };
+
+ /**
+ * Creates a new instance of a {@link BackScrollManager} that connected the header and the list
+ * view.
+ */
+ public static void bind(ScrollableHeader header, ListView listView) {
+ BackScrollManager backScrollManager = new BackScrollManager(header, listView);
+ backScrollManager.bind();
+ }
+
+ private BackScrollManager(ScrollableHeader header, ListView listView) {
+ mHeader = header;
+ mListView = listView;
+ }
+
+ private void bind() {
+ mListView.setOnScrollListener(mScrollListener);
+ // We disable the scroll bar because it would otherwise be incorrect because of the hidden
+ // header.
+ mListView.setVerticalScrollBarEnabled(false);
+ }
+}
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index 14b38b9..aa52d91 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -16,6 +16,7 @@
package com.android.contacts;
+import com.android.contacts.BackScrollManager.ScrollableHeader;
import com.android.contacts.calllog.CallDetailHistoryAdapter;
import com.android.contacts.calllog.CallTypeHelper;
import com.android.contacts.calllog.PhoneNumberHelper;
@@ -434,7 +435,25 @@
ListView historyList = (ListView) findViewById(R.id.history);
historyList.setAdapter(
new CallDetailHistoryAdapter(CallDetailActivity.this, mInflater,
- mCallTypeHelper, details));
+ mCallTypeHelper, details, hasVoicemail(), canPlaceCallsTo));
+ BackScrollManager.bind(
+ new ScrollableHeader() {
+ private View controls = findViewById(R.id.controls);
+ private View photo = findViewById(R.id.contact_background_sizer);
+ private View nameHeader = findViewById(R.id.photo_text_bar);
+
+ @Override
+ public void setOffset(int offset) {
+ controls.setY(-offset);
+ }
+
+ @Override
+ public int getMaximumScrollableHeaderOffset() {
+ // We can scroll the photo out, but we should keep the header.
+ return photo.getHeight() - nameHeader.getHeight();
+ }
+ },
+ historyList);
loadContactPhotos(photoUri);
findViewById(R.id.call_detail).setVisibility(View.VISIBLE);
}
diff --git a/src/com/android/contacts/GroupListLoader.java b/src/com/android/contacts/GroupListLoader.java
index 39c428f..b567ba8 100644
--- a/src/com/android/contacts/GroupListLoader.java
+++ b/src/com/android/contacts/GroupListLoader.java
@@ -37,7 +37,6 @@
Groups.ACTION,
Groups.ACTION_URI,
Groups.SUMMARY_COUNT,
- Groups.SUMMARY_GROUP_COUNT_PER_ACCOUNT,
};
public final static int ACCOUNT_NAME = 0;
@@ -48,10 +47,8 @@
public final static int ACTION = 5;
public final static int ACTION_URI = 6;
public final static int MEMBER_COUNT = 7;
- public final static int GROUP_COUNT_PER_ACCOUNT = 8;
- private static final Uri GROUP_LIST_URI = Groups.CONTENT_SUMMARY_URI.buildUpon()
- .appendQueryParameter(Groups.PARAM_RETURN_GROUP_COUNT_PER_ACCOUNT, "true").build();
+ private static final Uri GROUP_LIST_URI = Groups.CONTENT_SUMMARY_URI;
public GroupListLoader(Context context) {
super(context, GROUP_LIST_URI, COLUMNS, Groups.ACCOUNT_TYPE + " NOT NULL AND "
diff --git a/src/com/android/contacts/calllog/CallDetailHistoryAdapter.java b/src/com/android/contacts/calllog/CallDetailHistoryAdapter.java
index 3de5730..ed9c2e0 100644
--- a/src/com/android/contacts/calllog/CallDetailHistoryAdapter.java
+++ b/src/com/android/contacts/calllog/CallDetailHistoryAdapter.java
@@ -32,42 +32,86 @@
* Adapter for a ListView containing history items from the details of a call.
*/
public class CallDetailHistoryAdapter extends BaseAdapter {
+ /** The top element is a blank header, which is hidden under the rest of the UI. */
+ private static final int VIEW_TYPE_HEADER = 0;
+ /** Each history item shows the detail of a call. */
+ private static final int VIEW_TYPE_HISTORY_ITEM = 1;
+
private final Context mContext;
private final LayoutInflater mLayoutInflater;
private final CallTypeHelper mCallTypeHelper;
private final PhoneCallDetails[] mPhoneCallDetails;
+ /** Whether the voicemail controls are shown. */
+ private final boolean mShowVoicemail;
+ /** Whether the call and SMS controls are shown. */
+ private final boolean mShowCallAndSms;
public CallDetailHistoryAdapter(Context context, LayoutInflater layoutInflater,
- CallTypeHelper callTypeHelper, PhoneCallDetails[] phoneCallDetails) {
+ CallTypeHelper callTypeHelper, PhoneCallDetails[] phoneCallDetails,
+ boolean showVoicemail, boolean showCallAndSms) {
mContext = context;
mLayoutInflater = layoutInflater;
mCallTypeHelper = callTypeHelper;
mPhoneCallDetails = phoneCallDetails;
+ mShowVoicemail = showVoicemail;
+ mShowCallAndSms = showCallAndSms;
}
@Override
public int getCount() {
- return mPhoneCallDetails.length;
+ return mPhoneCallDetails.length + 1;
}
@Override
public Object getItem(int position) {
- return mPhoneCallDetails[position];
+ if (position == 0) {
+ return null;
+ }
+ return mPhoneCallDetails[position - 1];
}
@Override
public long getItemId(int position) {
- return position;
+ if (position == 0) {
+ return -1;
+ }
+ return position - 1;
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ return 2;
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ if (position == 0) {
+ return VIEW_TYPE_HEADER;
+ }
+ return VIEW_TYPE_HISTORY_ITEM;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
+ if (position == 0) {
+ final View header = convertView == null
+ ? mLayoutInflater.inflate(R.layout.call_detail_history_header, parent, false)
+ : convertView;
+ // Voicemail controls are only shown in the main UI if there is a voicemail.
+ View voicemailContainer = header.findViewById(R.id.header_voicemail_container);
+ voicemailContainer.setVisibility(mShowVoicemail ? View.VISIBLE : View.GONE);
+ // Call and SMS controls are only shown in the main UI if there is a known number.
+ View callAndSmsContainer = header.findViewById(R.id.header_call_and_sms_container);
+ callAndSmsContainer.setVisibility(mShowCallAndSms ? View.VISIBLE : View.GONE);
+ return header;
+ }
+
// Make sure we have a valid convertView to start with
final View result = convertView == null
? mLayoutInflater.inflate(R.layout.call_detail_history_item, parent, false)
: convertView;
- PhoneCallDetails details = mPhoneCallDetails[position];
+ PhoneCallDetails details = mPhoneCallDetails[position - 1];
CallTypeIconsView callTypeIconView =
(CallTypeIconsView) result.findViewById(R.id.call_type_icon);
TextView callTypeTextView = (TextView) result.findViewById(R.id.call_type_text);
diff --git a/src/com/android/contacts/calllog/CallLogFragment.java b/src/com/android/contacts/calllog/CallLogFragment.java
index 1ec3602..740f2f2 100644
--- a/src/com/android/contacts/calllog/CallLogFragment.java
+++ b/src/com/android/contacts/calllog/CallLogFragment.java
@@ -24,6 +24,7 @@
import com.android.contacts.R;
import com.android.contacts.activities.DialtactsActivity;
import com.android.contacts.activities.DialtactsActivity.ViewPagerVisibilityListener;
+import com.android.contacts.test.NeededForTesting;
import com.android.contacts.util.ExpirableCache;
import com.android.contacts.voicemail.VoicemailStatusHelper;
import com.android.contacts.voicemail.VoicemailStatusHelper.StatusMessage;
@@ -167,6 +168,8 @@
private boolean mScrollToTop;
private boolean mShowOptionsMenu;
+ /** Whether we are currently filtering over voicemail. */
+ private boolean mShowingVoicemailOnly = false;
private VoicemailStatusHelper mVoicemailStatusHelper;
private View mStatusMessageView;
@@ -228,6 +231,10 @@
public void addGroup(int cursorPosition, int size, boolean expanded);
}
+ public interface CallFetcher {
+ public void fetchAllCalls();
+ }
+
/** Adapter class to fill in data for the Call Log */
public static final class CallLogAdapter extends GroupingListAdapter
implements Runnable, ViewTreeObserver.OnPreDrawListener, GroupCreator {
@@ -236,7 +243,7 @@
private final Context mContext;
private final String mCurrentCountryIso;
- private final CallLogQueryHandler mCallLogQueryHandler;
+ private final CallFetcher mCallFetcher;
/**
* A cache of the contact details for the phone numbers in the call log.
@@ -320,13 +327,13 @@
}
};
- public CallLogAdapter(Context context, CallLogQueryHandler callLogQueryHandler,
+ public CallLogAdapter(Context context, CallFetcher callFetcher,
String currentCountryIso, String voicemailNumber) {
super(context);
mContext = context;
mCurrentCountryIso = currentCountryIso;
- mCallLogQueryHandler = callLogQueryHandler;
+ mCallFetcher = callFetcher;
mContactInfoCache = ExpirableCache.create(CONTACT_INFO_CACHE_SIZE);
mRequests = new LinkedList<String>();
@@ -350,9 +357,9 @@
*/
@Override
protected void onContentChanged() {
- // Start async requery
- setLoading(true);
- mCallLogQueryHandler.fetchAllCalls();
+ // When the content changes, always fetch all the calls, in case a new missed call came
+ // in and we were filtering over voicemail only, so that we see the missed call.
+ mCallFetcher.fetchAllCalls();
}
void setLoading(boolean loading) {
@@ -921,8 +928,13 @@
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
String currentCountryIso = ContactsUtils.getCurrentCountryIso(getActivity());
- mAdapter = new CallLogAdapter(getActivity(), mCallLogQueryHandler, currentCountryIso,
- getVoiceMailNumber());
+ mAdapter = new CallLogAdapter(getActivity(),
+ new CallFetcher() {
+ @Override
+ public void fetchAllCalls() {
+ startCallsQuery();
+ }
+ }, currentCountryIso, mVoiceMailNumber);
setListAdapter(mAdapter);
getListView().setItemsCanFocus(true);
}
@@ -991,6 +1003,10 @@
private void startCallsQuery() {
mAdapter.setLoading(true);
mCallLogQueryHandler.fetchAllCalls();
+ if (mShowingVoicemailOnly) {
+ mShowingVoicemailOnly = false;
+ getActivity().invalidateOptionsMenu();
+ }
}
private void startVoicemailStatusQuery() {
@@ -1010,21 +1026,28 @@
if (mShowOptionsMenu) {
menu.findItem(R.id.menu_call_settings_call_log)
.setIntent(DialtactsActivity.getCallSettingsIntent());
+ menu.findItem(R.id.show_voicemails_only).setVisible(!mShowingVoicemailOnly);
+ menu.findItem(R.id.show_all_calls).setVisible(mShowingVoicemailOnly);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
- case R.id.delete_all: {
+ case R.id.delete_all:
ClearCallLogDialog.show(getFragmentManager());
return true;
- }
- case R.id.show_voicemails_only: {
+ case R.id.show_voicemails_only:
mCallLogQueryHandler.fetchVoicemailOnly();
+ mShowingVoicemailOnly = true;
return true;
- }
+
+ case R.id.show_all_calls:
+ mCallLogQueryHandler.fetchAllCalls();
+ mShowingVoicemailOnly = false;
+ return true;
+
default:
return false;
}
@@ -1110,12 +1133,12 @@
}
}
- @VisibleForTesting
+ @NeededForTesting
public CallLogAdapter getAdapter() {
return mAdapter;
}
- @VisibleForTesting
+ @NeededForTesting
public String getVoiceMailNumber() {
return mVoiceMailNumber;
}
diff --git a/src/com/android/contacts/calllog/IntentProvider.java b/src/com/android/contacts/calllog/IntentProvider.java
index 8173238..9ce3d3d 100644
--- a/src/com/android/contacts/calllog/IntentProvider.java
+++ b/src/com/android/contacts/calllog/IntentProvider.java
@@ -84,7 +84,15 @@
return null;
}
Intent intent = new Intent(context, CallDetailActivity.class);
- if (adapter.isGroupHeader(position)) {
+ // Check if the first item is a voicemail.
+ String voicemailUri = cursor.getString(CallLogQuery.VOICEMAIL_URI);
+ if (voicemailUri != null) {
+ intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_URI,
+ Uri.parse(voicemailUri));
+ }
+ intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_START_PLAYBACK, false);
+
+ if (groupSize > 1) {
// We want to restore the position in the cursor at the end.
long[] ids = new long[groupSize];
// Copy the ids of the rows in the group.
@@ -97,12 +105,6 @@
// If there is a single item, use the direct URI for it.
intent.setData(ContentUris.withAppendedId(
Calls.CONTENT_URI_WITH_VOICEMAIL, id));
- String voicemailUri = cursor.getString(CallLogQuery.VOICEMAIL_URI);
- if (voicemailUri != null) {
- intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_URI,
- Uri.parse(voicemailUri));
- }
- intent.putExtra(CallDetailActivity.EXTRA_VOICEMAIL_START_PLAYBACK, false);
}
return intent;
}
diff --git a/src/com/android/contacts/detail/ContactDetailDisplayUtils.java b/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
index f74b56a..131f052 100644
--- a/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
+++ b/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
@@ -222,6 +222,8 @@
if (!contactData.getStreamItems().isEmpty()) {
StreamItemEntry firstEntry = contactData.getStreamItems().get(0);
snippet = Html.fromHtml(firstEntry.getText());
+ // Add quotes around the text
+ snippet = context.getString(R.string.recent_updates_tab_text, snippet);
if (!firstEntry.getPhotos().isEmpty()) {
StreamItemPhotoEntry firstPhoto = firstEntry.getPhotos().get(0);
photoUri = firstPhoto.getPhotoUri();
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 47617d3..d56afc1 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -142,7 +142,6 @@
private NfcHandler mNfcHandler;
private ContactLoader.Result mContactData;
- private ViewGroup mHeaderView;
private ImageView mStaticPhotoView;
private ListView mListView;
private ViewAdapter mAdapter;
@@ -396,9 +395,6 @@
return;
}
- // Clear old header
- mHeaderView = null;
-
// Figure out if the contact has social updates or not
mContactHasSocialUpdates = !mContactData.getStreamItems().isEmpty();
@@ -797,7 +793,7 @@
}
// Add a title
- String networkKindTitle = mContext.getString(R.string.network);
+ String networkKindTitle = mContext.getString(R.string.connections);
mAllEntries.add(new KindTitleViewEntry(networkKindTitle.toUpperCase()));
// Add the attribution if applicable
@@ -1149,7 +1145,7 @@
// TODO Icon is temporary. Need proper one.
return new NetworkTitleViewEntry(
context.getResources().getDrawable(R.drawable.ic_menu_add_field_holo_light),
- context.getString(R.string.more_networks_button),
+ context.getString(R.string.add_connection_button),
onClickListener);
}
@@ -1340,6 +1336,25 @@
}
/**
+ * Cache of the children views for a view that displays a header view entry.
+ */
+ private static class HeaderViewCache {
+ public final TextView displayNameView;
+ public final TextView companyView;
+ public final ImageView photoView;
+ public final CheckBox starredView;
+ public final int layoutResourceId;
+
+ public HeaderViewCache(View view, int layoutResourceInflated) {
+ displayNameView = (TextView) view.findViewById(R.id.name);
+ companyView = (TextView) view.findViewById(R.id.company);
+ photoView = (ImageView) view.findViewById(R.id.photo);
+ starredView = (CheckBox) view.findViewById(R.id.star);
+ layoutResourceId = layoutResourceInflated;
+ }
+ }
+
+ /**
* Cache of the children views for a view that displays a {@link NetworkTitleViewEntry}
*/
private static class NetworkTitleViewCache {
@@ -1421,53 +1436,58 @@
}
private View getHeaderEntryView(View convertView, ViewGroup parent) {
- // We don't want to rely on the recycled header view because it may
- // have been left over from a previously viewed contact (since we
- // reuse the adapter), so we would have to bind the data to the
- // header each time. However, since there is only 1 header per list,
- // just hold onto the original header view for this contact and
- // return that each time.
- if (mHeaderView != null) {
- return mHeaderView;
- }
-
- int resourceId = mContactHasSocialUpdates ?
+ final int desiredLayoutResourceId = mContactHasSocialUpdates ?
R.layout.detail_header_contact_with_updates :
R.layout.detail_header_contact_without_updates;
- mHeaderView = (ViewGroup) inflate(resourceId, parent, false);
+ View result = null;
+ HeaderViewCache viewCache = null;
- TextView displayNameView = (TextView) mHeaderView.findViewById(R.id.name);
- TextView companyView = (TextView) mHeaderView.findViewById(R.id.company);
- ImageView photoView = (ImageView) mHeaderView.findViewById(R.id.photo);
+ // Only use convertView if it has the same layout resource ID as the one desired
+ // (the two can be different on wide 2-pane screens where the detail fragment is reused
+ // for many different contacts that do and do not have social updates).
+ if (convertView != null) {
+ viewCache = (HeaderViewCache) convertView.getTag();
+ if (viewCache.layoutResourceId == desiredLayoutResourceId) {
+ result = convertView;
+ }
+ }
- ContactDetailDisplayUtils.setDisplayName(mContext, mContactData, displayNameView);
- ContactDetailDisplayUtils.setCompanyName(mContext, mContactData, companyView);
+ // Otherwise inflate a new header view and create a new view cache.
+ if (result == null) {
+ result = mInflater.inflate(desiredLayoutResourceId, parent, false);
+ viewCache = new HeaderViewCache(result, desiredLayoutResourceId);
+ result.setTag(viewCache);
+ }
+
+ ContactDetailDisplayUtils.setDisplayName(mContext, mContactData,
+ viewCache.displayNameView);
+ ContactDetailDisplayUtils.setCompanyName(mContext, mContactData, viewCache.companyView);
// Set the photo if it should be displayed
- if (photoView != null) {
- ContactDetailDisplayUtils.setPhoto(mContext, mContactData, photoView);
+ if (viewCache.photoView != null) {
+ ContactDetailDisplayUtils.setPhoto(mContext, mContactData, viewCache.photoView);
}
// Set the starred state if it should be displayed
- final CheckBox starredView = (CheckBox) mHeaderView.findViewById(R.id.star);
- if (starredView != null) {
- ContactDetailDisplayUtils.setStarred(mContactData, starredView);
+ final CheckBox favoritesStar = viewCache.starredView;
+ if (favoritesStar != null) {
+ ContactDetailDisplayUtils.setStarred(mContactData, favoritesStar);
final Uri lookupUri = mContactData.getLookupUri();
- starredView.setOnClickListener(new OnClickListener() {
+ favoritesStar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// Toggle "starred" state
// Make sure there is a contact
if (lookupUri != null) {
Intent intent = ContactSaveService.createSetStarredIntent(
- getContext(), lookupUri, starredView.isChecked());
+ getContext(), lookupUri, favoritesStar.isChecked());
getContext().startService(intent);
}
}
});
}
- return mHeaderView;
+ return result;
}
private View getSeparatorEntryView(int position, View convertView, ViewGroup parent) {
diff --git a/src/com/android/contacts/detail/ContactDetailUpdatesFragment.java b/src/com/android/contacts/detail/ContactDetailUpdatesFragment.java
index bb2bdb4..02bd314 100644
--- a/src/com/android/contacts/detail/ContactDetailUpdatesFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailUpdatesFragment.java
@@ -31,7 +31,6 @@
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AbsListView.OnScrollListener;
-import android.widget.TextView;
public class ContactDetailUpdatesFragment extends ListFragment
implements FragmentKeyListener, ViewOverlay {
@@ -104,11 +103,6 @@
View rootView = mInflater.inflate(R.layout.contact_detail_updates_fragment, container,
false);
- TextView titleTextView = (TextView) rootView.findViewById(R.id.kind);
- if (titleTextView != null) {
- titleTextView.setText(getString(R.string.recent_updates).toUpperCase());
- }
-
mAlphaLayer = rootView.findViewById(R.id.alpha_overlay);
mTouchInterceptLayer = rootView.findViewById(R.id.touch_intercept_overlay);
@@ -137,7 +131,13 @@
}
mLookupUri = lookupUri;
mContactData = result;
- mStreamItemAdapter.setStreamItems(mContactData.getStreamItems());
+
+ // If the adapter has been created already, then try to set stream items. Otherwise,
+ // wait for the adapter to get initialized, after which we will try to set the stream items
+ // again.
+ if (mStreamItemAdapter != null) {
+ mStreamItemAdapter.setStreamItems(mContactData.getStreamItems());
+ }
}
@Override
diff --git a/src/com/android/contacts/detail/StreamItemAdapter.java b/src/com/android/contacts/detail/StreamItemAdapter.java
index 95880d7..09aa20b 100644
--- a/src/com/android/contacts/detail/StreamItemAdapter.java
+++ b/src/com/android/contacts/detail/StreamItemAdapter.java
@@ -32,8 +32,12 @@
* List adapter for stream items of a given contact.
*/
public class StreamItemAdapter extends BaseAdapter {
+ /** The header view, hidden under the tab carousel, if present. */
private static final int ITEM_VIEW_TYPE_HEADER = 0;
- private static final int ITEM_VIEW_TYPE_STREAM_ITEM = 1;
+ /** The title shown in the updates stream. */
+ private static final int ITEM_VIEW_TYPE_TITLE = 1;
+ /** The updates in the list. */
+ private static final int ITEM_VIEW_TYPE_STREAM_ITEM = 2;
private final Context mContext;
private final View.OnClickListener mListener;
@@ -50,20 +54,20 @@
@Override
public int getCount() {
- return mStreamItems.size() + 1;
+ return mStreamItems.size() + 2;
}
@Override
public Object getItem(int position) {
- if (position == 0) {
+ if (position == 0 || position == 1) {
return null;
}
- return mStreamItems.get(position - 1);
+ return mStreamItems.get(position - 2);
}
@Override
public long getItemId(int position) {
- if (position == 0) {
+ if (position == 0 || position == 1) {
return -1;
}
return position - 1;
@@ -74,6 +78,9 @@
if (position == 0) {
return mInflater.inflate(R.layout.updates_header_contact, null);
}
+ if (position == 1) {
+ return mInflater.inflate(R.layout.updates_title, null);
+ }
StreamItemEntry streamItem = (StreamItemEntry) getItem(position);
View view = ContactDetailDisplayUtils.createStreamItemView(
mInflater, mContext, streamItem, null);
@@ -94,6 +101,9 @@
if (position == 0) {
return ITEM_VIEW_TYPE_HEADER;
}
+ if (position == 1) {
+ return ITEM_VIEW_TYPE_TITLE;
+ }
return ITEM_VIEW_TYPE_STREAM_ITEM;
}
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index afc3ab1..3869c54 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -803,7 +803,14 @@
// TODO: Find a better way to handle shortcuts, i.e. onKeyDown()?
menu.findItem(R.id.menu_done).setVisible(false);
- menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1);
+ boolean editingUserProfile = mIsUserProfile || mNewLocalProfile;
+ // Split only if more than one raw profile and not a user profile
+ menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1 &&
+ !editingUserProfile);
+ // Cannot join a user profile
+ menu.findItem(R.id.menu_join).setVisible(!editingUserProfile);
+
+
int size = menu.size();
for (int i = 0; i < size; i++) {
menu.getItem(i).setEnabled(mEnabled);
@@ -987,7 +994,7 @@
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(R.string.cancel_confirmation_dialog_title)
.setMessage(R.string.cancel_confirmation_dialog_message)
- .setPositiveButton(R.string.discard,
+ .setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
diff --git a/src/com/android/contacts/editor/EventFieldEditorView.java b/src/com/android/contacts/editor/EventFieldEditorView.java
index e7da6c1..4a5a502 100644
--- a/src/com/android/contacts/editor/EventFieldEditorView.java
+++ b/src/com/android/contacts/editor/EventFieldEditorView.java
@@ -80,7 +80,7 @@
Resources resources = mContext.getResources();
mPrimaryTextColor = resources.getColor(R.color.primary_text_color);
mSecondaryTextColor = resources.getColor(R.color.secondary_text_color);
- mNoDateString = mContext.getString(R.string.add_new_entry_for_section);
+ mNoDateString = mContext.getString(R.string.event_edit_field_hint_text);
mDateView = (Button) findViewById(R.id.date_view);
mDateView.setOnClickListener(new OnClickListener() {
diff --git a/src/com/android/contacts/editor/GroupMembershipView.java b/src/com/android/contacts/editor/GroupMembershipView.java
index 042b80a..42d2edd 100644
--- a/src/com/android/contacts/editor/GroupMembershipView.java
+++ b/src/com/android/contacts/editor/GroupMembershipView.java
@@ -115,7 +115,7 @@
Resources resources = mContext.getResources();
mPrimaryTextColor = resources.getColor(R.color.primary_text_color);
mSecondaryTextColor = resources.getColor(R.color.secondary_text_color);
- mNoGroupString = mContext.getString(R.string.add_new_entry_for_section);
+ mNoGroupString = mContext.getString(R.string.group_edit_field_hint_text);
}
@Override
diff --git a/src/com/android/contacts/group/GroupBrowseListAdapter.java b/src/com/android/contacts/group/GroupBrowseListAdapter.java
index 6571b99..c8c16e6 100644
--- a/src/com/android/contacts/group/GroupBrowseListAdapter.java
+++ b/src/com/android/contacts/group/GroupBrowseListAdapter.java
@@ -253,7 +253,6 @@
long groupId = mCursor.getLong(GroupListLoader.GROUP_ID);
String title = mCursor.getString(GroupListLoader.TITLE);
int memberCount = mCursor.getInt(GroupListLoader.MEMBER_COUNT);
- int groupCountForThisAccount = mCursor.getInt(GroupListLoader.GROUP_COUNT_PER_ACCOUNT);
// Figure out if this is the first group for this account name / account type pair by
// checking the previous entry. This is to determine whether or not we need to display an
@@ -273,7 +272,7 @@
}
return new GroupListItem(accountName, accountType, dataSet, groupId, title,
- isFirstGroupInAccount, memberCount, groupCountForThisAccount);
+ isFirstGroupInAccount, memberCount);
}
@Override
@@ -349,10 +348,6 @@
entry.getAccountType(), entry.getDataSet());
viewCache.accountType.setText(accountType.getDisplayLabel(mContext).toString());
viewCache.accountName.setText(entry.getAccountName());
-
- int count = entry.getGroupCountForThisAccount();
- viewCache.groupCountForAccount.setText(mContext.getResources().getQuantityString(
- R.plurals.num_groups_in_account, count, count));
}
private static Uri getGroupUriFromId(long groupId) {
@@ -379,7 +374,6 @@
public static class GroupListItemViewCache {
public final TextView accountType;
public final TextView accountName;
- public final TextView groupCountForAccount;
public final TextView groupTitle;
public final TextView groupMemberCount;
public final View accountHeader;
@@ -389,7 +383,6 @@
public GroupListItemViewCache(View view) {
accountType = (TextView) view.findViewById(R.id.account_type);
accountName = (TextView) view.findViewById(R.id.account_name);
- groupCountForAccount = (TextView) view.findViewById(R.id.group_count);
groupTitle = (TextView) view.findViewById(R.id.label);
groupMemberCount = (TextView) view.findViewById(R.id.count);
accountHeader = view.findViewById(R.id.group_list_header);
diff --git a/src/com/android/contacts/group/GroupBrowseListFragment.java b/src/com/android/contacts/group/GroupBrowseListFragment.java
index 835400f..aca638e 100644
--- a/src/com/android/contacts/group/GroupBrowseListFragment.java
+++ b/src/com/android/contacts/group/GroupBrowseListFragment.java
@@ -152,8 +152,6 @@
}
private void configureVerticalScrollbar() {
- mListView.setFastScrollEnabled(true);
- mListView.setFastScrollAlwaysVisible(true);
mListView.setVerticalScrollbarPosition(mVerticalScrollbarPosition);
mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
int leftPadding = 0;
@@ -259,7 +257,8 @@
protected void requestSelectionToScreen() {
int selectedPosition = mAdapter.getSelectedGroupPosition();
if (selectedPosition != -1) {
- mListView.requestPositionToScreen(selectedPosition, true /* smooth scroll requested */);
+ mListView.requestPositionToScreen(selectedPosition,
+ true /* smooth scroll requested */);
}
}
diff --git a/src/com/android/contacts/group/GroupEditorFragment.java b/src/com/android/contacts/group/GroupEditorFragment.java
index b060541..a2feff8 100644
--- a/src/com/android/contacts/group/GroupEditorFragment.java
+++ b/src/com/android/contacts/group/GroupEditorFragment.java
@@ -515,7 +515,7 @@
.setIconAttribute(android.R.attr.alertDialogIcon)
.setTitle(R.string.cancel_confirmation_dialog_title)
.setMessage(R.string.cancel_confirmation_dialog_message)
- .setPositiveButton(R.string.discard,
+ .setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int whichButton) {
diff --git a/src/com/android/contacts/group/GroupListItem.java b/src/com/android/contacts/group/GroupListItem.java
index c707ea7..a06ec38 100644
--- a/src/com/android/contacts/group/GroupListItem.java
+++ b/src/com/android/contacts/group/GroupListItem.java
@@ -28,12 +28,8 @@
private final boolean mIsFirstGroupInAccount;
private final int mMemberCount;
- /** Number of groups in the account that this group belongs to */
- private final int mGroupCountForThisAccount;
-
public GroupListItem(String accountName, String accountType, String dataSet, long groupId,
- String title, boolean isFirstGroupInAccount, int memberCount,
- int groupCountForThisAccount) {
+ String title, boolean isFirstGroupInAccount, int memberCount) {
mAccountName = accountName;
mAccountType = accountType;
mDataSet = dataSet;
@@ -41,7 +37,6 @@
mTitle = title;
mIsFirstGroupInAccount = isFirstGroupInAccount;
mMemberCount = memberCount;
- mGroupCountForThisAccount = groupCountForThisAccount;
}
public String getAccountName() {
@@ -75,8 +70,4 @@
public boolean isFirstGroupInAccount() {
return mIsFirstGroupInAccount;
}
-
- public int getGroupCountForThisAccount() {
- return mGroupCountForThisAccount;
- }
}
\ No newline at end of file
diff --git a/src/com/android/contacts/interactions/GroupDeletionDialogFragment.java b/src/com/android/contacts/interactions/GroupDeletionDialogFragment.java
index c9c1342..c1f3bd7 100644
--- a/src/com/android/contacts/interactions/GroupDeletionDialogFragment.java
+++ b/src/com/android/contacts/interactions/GroupDeletionDialogFragment.java
@@ -32,19 +32,15 @@
private static final String ARG_GROUP_ID = "groupId";
private static final String ARG_LABEL = "label";
-
- private boolean mEndActivity;
-
- public GroupDeletionDialogFragment(boolean endActivity) {
- mEndActivity = endActivity;
- }
+ private static final String ARG_SHOULD_END_ACTIVITY = "endActivity";
public static void show(FragmentManager fragmentManager, long groupId, String label,
boolean endActivity) {
- GroupDeletionDialogFragment dialog = new GroupDeletionDialogFragment(endActivity);
+ GroupDeletionDialogFragment dialog = new GroupDeletionDialogFragment();
Bundle args = new Bundle();
args.putLong(ARG_GROUP_ID, groupId);
args.putString(ARG_LABEL, label);
+ args.putBoolean(ARG_SHOULD_END_ACTIVITY, endActivity);
dialog.setArguments(args);
dialog.show(fragmentManager, "deleteGroup");
}
@@ -76,8 +72,12 @@
getActivity().startService(ContactSaveService.createGroupDeletionIntent(
getActivity(), groupId));
- if (mEndActivity) {
+ if (shouldEndActivity()) {
getActivity().finish();
}
}
+
+ private boolean shouldEndActivity() {
+ return getArguments().getBoolean(ARG_SHOULD_END_ACTIVITY);
+ }
}
diff --git a/src/com/android/contacts/list/ContactBrowseListFragment.java b/src/com/android/contacts/list/ContactBrowseListFragment.java
index fc9abe7..2380345 100644
--- a/src/com/android/contacts/list/ContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/ContactBrowseListFragment.java
@@ -378,7 +378,8 @@
return;
}
- if (!isSearchMode() && mFilter != null) {
+ boolean searchMode = isSearchMode();
+ if (!searchMode && mFilter != null) {
adapter.setFilter(mFilter);
if (mSelectionRequired
|| mFilter.filterType == ContactListFilter.FILTER_TYPE_SINGLE_CONTACT) {
@@ -387,8 +388,8 @@
}
}
- // Display the user's profile.
- adapter.setIncludeProfile(true);
+ // Display the user's profile if not in search mode
+ adapter.setIncludeProfile(!searchMode);
}
@Override
diff --git a/src/com/android/contacts/list/ContactEntryListAdapter.java b/src/com/android/contacts/list/ContactEntryListAdapter.java
index 4ac54dc..e75be26 100644
--- a/src/com/android/contacts/list/ContactEntryListAdapter.java
+++ b/src/com/android/contacts/list/ContactEntryListAdapter.java
@@ -106,6 +106,7 @@
((ContactListPinnedHeaderView)pinnedHeaderView).setSectionHeader(title);
}
+ @Override
protected void setPinnedHeaderContactsCount(View header) {
// Update the header with the contacts count only if a profile header exists
// otherwise, the contacts count are shown in the empty profile header view
@@ -116,6 +117,7 @@
}
}
+ @Override
protected void clearPinnedHeaderContactsCount(View header) {
((ContactListPinnedHeaderView)header).setCountView(null);
}
diff --git a/src/com/android/contacts/list/ContactListItemView.java b/src/com/android/contacts/list/ContactListItemView.java
index 7ddece6..4c4b780 100644
--- a/src/com/android/contacts/list/ContactListItemView.java
+++ b/src/com/android/contacts/list/ContactListItemView.java
@@ -32,7 +32,6 @@
import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
-import android.provider.ContactsContract.Contacts;
import android.text.TextUtils;
import android.text.TextUtils.TruncateAt;
import android.util.AttributeSet;
@@ -89,7 +88,6 @@
private final int mCountViewTextSize;
private final int mContactsCountTextColor;
private final int mTextIndent;
-
private Drawable mActivatedBackgroundDrawable;
// Horizontal divider between contact views.
@@ -230,7 +228,7 @@
R.styleable.ContactListItemView_list_item_header_text_indent, 0);
mHeaderTextColor = a.getColor(
R.styleable.ContactListItemView_list_item_header_text_color, Color.BLACK);
- mHeaderTextSize = (int)a.getDimensionPixelSize(
+ mHeaderTextSize = a.getDimensionPixelSize(
R.styleable.ContactListItemView_list_item_header_text_size, 12);
mHeaderBackgroundHeight = a.getDimensionPixelSize(
R.styleable.ContactListItemView_list_item_header_height, 30);
@@ -240,7 +238,7 @@
R.styleable.ContactListItemView_list_item_header_underline_color, 0);
mTextIndent = a.getDimensionPixelOffset(
R.styleable.ContactListItemView_list_item_text_indent, 0);
- mCountViewTextSize = (int)a.getDimensionPixelSize(
+ mCountViewTextSize = a.getDimensionPixelSize(
R.styleable.ContactListItemView_list_item_contacts_count_text_size, 12);
mContactsCountTextColor = a.getColor(
R.styleable.ContactListItemView_list_item_contacts_count_text_color, Color.BLACK);
diff --git a/src/com/android/contacts/list/ContactListPinnedHeaderView.java b/src/com/android/contacts/list/ContactListPinnedHeaderView.java
index 5983007..5e95e4d 100644
--- a/src/com/android/contacts/list/ContactListPinnedHeaderView.java
+++ b/src/com/android/contacts/list/ContactListPinnedHeaderView.java
@@ -20,10 +20,8 @@
import android.content.Context;
import android.content.res.TypedArray;
-import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.TypedValue;
@@ -124,7 +122,7 @@
if (isViewMeasurable(mCountTextView)) {
mCountTextView.layout(width - mPaddingRight - mCountTextView.getMeasuredWidth(),
0,
- width,
+ width - mPaddingRight,
mHeaderBackgroundHeight);
}
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index 4db2270..5134a1a 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -41,11 +41,14 @@
private View mSearchHeaderView;
private TextView mAccountFilterHeaderView;
private View mAccountFilterHeaderContainer;
+ private FrameLayout mProfileHeaderContainer;
private View mProfileHeader;
private Button mProfileMessage;
private FrameLayout mMessageContainer;
private View mProfileTitle;
+ private View mPaddingView;
+
public DefaultContactBrowseListFragment() {
setPhotoLoaderEnabled(true);
setSectionHeaderDisplayEnabled(true);
@@ -209,11 +212,14 @@
// Changing visibility of just the mProfileHeader doesn't do anything unless
// you change visibility of its children, hence the call to mCounterHeaderView
// and mProfileTitle
+ mProfileHeaderContainer.setVisibility(show ? View.VISIBLE : View.GONE);
mProfileHeader.setVisibility(show ? View.VISIBLE : View.GONE);
mCounterHeaderView.setVisibility(show ? View.VISIBLE : View.GONE);
mProfileTitle.setVisibility(show ? View.VISIBLE : View.GONE);
mMessageContainer.setVisibility(show ? View.VISIBLE : View.GONE);
mProfileMessage.setVisibility(show ? View.VISIBLE : View.GONE);
+
+ mPaddingView.setVisibility(show ? View.GONE : View.VISIBLE);
}
/**
@@ -226,14 +232,16 @@
ListView list = getListView();
// Put a header with the "ME" name and a view for the number of contacts
+ // The view is embedded in a frame view since you cannot change the visibility of a
+ // view in a ListView without having a parent view.
+ mProfileHeaderContainer = new FrameLayout(inflater.getContext());
mProfileHeader = inflater.inflate(R.layout.user_profile_header, null, false);
mCounterHeaderView = (TextView) mProfileHeader.findViewById(R.id.contacts_count);
mProfileTitle = mProfileHeader.findViewById(R.id.profile_title);
- list.addHeaderView(mProfileHeader, null, false);
+ mProfileHeaderContainer.addView(mProfileHeader);
+ list.addHeaderView(mProfileHeaderContainer, null, false);
// Add a selectable view with a message inviting the user to create a local profile
- // The view is embedded in a frame view since you cannot change the visibility of a
- // view in a ListView without having a parent view.
mMessageContainer = new FrameLayout(inflater.getContext());
mProfileMessage = (Button)inflater.inflate(R.layout.user_profile_button, null, false);
mMessageContainer.addView(mProfileMessage);
@@ -246,5 +254,11 @@
startActivity(intent);
}
});
+
+ View paddingViewContainer =
+ inflater.inflate(R.layout.contact_detail_list_padding, null, false);
+ mPaddingView = paddingViewContainer.findViewById(R.id.contact_detail_list_padding);
+ mPaddingView.setVisibility(View.GONE);
+ getListView().addHeaderView(paddingViewContainer);
}
}
diff --git a/src/com/android/contacts/list/DefaultContactListAdapter.java b/src/com/android/contacts/list/DefaultContactListAdapter.java
index e9804f5..f081921 100644
--- a/src/com/android/contacts/list/DefaultContactListAdapter.java
+++ b/src/com/android/contacts/list/DefaultContactListAdapter.java
@@ -196,7 +196,8 @@
+ "SELECT DISTINCT " + RawContacts.CONTACT_ID
+ " FROM raw_contacts"
+ " WHERE " + RawContacts.ACCOUNT_TYPE + "=?"
- + " AND " + RawContacts.ACCOUNT_NAME + "=?");
+ + " AND " + RawContacts.ACCOUNT_NAME + "=?"
+ + " OR " + Contacts.IS_USER_PROFILE + "=1");
selectionArgs.add(filter.accountType);
selectionArgs.add(filter.accountName);
if (filter.dataSet != null) {
diff --git a/src/com/android/contacts/list/PhoneNumberPickerFragment.java b/src/com/android/contacts/list/PhoneNumberPickerFragment.java
index 306efbd..5986b9c 100644
--- a/src/com/android/contacts/list/PhoneNumberPickerFragment.java
+++ b/src/com/android/contacts/list/PhoneNumberPickerFragment.java
@@ -48,6 +48,11 @@
private TextView mAccountFilterHeaderView;
private View mAccountFilterHeaderContainer;
+ /**
+ * Lives as ListView's header and is shown when {@link #mAccountFilterHeaderContainer} is set
+ * to View.GONE.
+ */
+ private View mPaddingView;
private static final String KEY_FILTER = "filter";
@@ -80,6 +85,10 @@
protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
super.onCreateView(inflater, container);
+ View paddingView = inflater.inflate(R.layout.contact_detail_list_padding, null, false);
+ mPaddingView = paddingView.findViewById(R.id.contact_detail_list_padding);
+ getListView().addHeaderView(paddingView);
+
mAccountFilterHeaderView = (TextView) getView().findViewById(R.id.account_filter_header);
mAccountFilterHeaderContainer =
getView().findViewById(R.id.account_filter_header_container);
@@ -101,8 +110,10 @@
mAccountFilterHeaderContainer.setVisibility(View.VISIBLE);
mAccountFilterHeaderView.setText(getContext().getString(
R.string.listAllContactsInAccount, filter.accountName));
+ mPaddingView.setVisibility(View.GONE);
} else {
mAccountFilterHeaderContainer.setVisibility(View.GONE);
+ mPaddingView.setVisibility(View.VISIBLE);
}
}
}
diff --git a/src/com/android/contacts/socialwidget/SocialWidgetProvider.java b/src/com/android/contacts/socialwidget/SocialWidgetProvider.java
index ee41332..98a843e 100644
--- a/src/com/android/contacts/socialwidget/SocialWidgetProvider.java
+++ b/src/com/android/contacts/socialwidget/SocialWidgetProvider.java
@@ -137,7 +137,6 @@
setDisplayNameAndSnippet(context, views,
context.getString(R.string.invalidContactMessage), null, null, null);
setPhoto(views, ContactBadgeUtil.loadPlaceholderPhoto(context));
- setStatusAttribution(views, null);
} else {
byte[] photo = contactData.getPhotoBinaryData();
setPhoto(views, photo != null
@@ -145,11 +144,6 @@
: ContactBadgeUtil.loadPlaceholderPhoto(context));
// TODO: Rotate between all the stream items?
- StreamItemEntry streamItem = null;
- if (!contactData.getStreamItems().isEmpty()) {
- streamItem = contactData.getStreamItems().get(0);
- setStatusAttribution(views, ContactBadgeUtil.getSocialDate(streamItem, context));
- }
// OnClick launch QuickContact
final Intent intent = new Intent(QuickContact.ACTION_QUICK_CONTACT);
@@ -229,17 +223,4 @@
}
}
}
-
- /**
- * Set the status attribution text to display in the header.
- */
- private static void setStatusAttribution(RemoteViews views,
- CharSequence attribution) {
- if (attribution == null) {
- views.setViewVisibility(R.id.status_date, View.GONE);
- } else {
- views.setTextViewText(R.id.status_date, attribution);
- views.setViewVisibility(R.id.status_date, View.VISIBLE);
- }
- }
}