Merge "Reduce number of views in call log."
diff --git a/res/drawable-hdpi/tab_selected_focused_holo.9.png b/res/drawable-hdpi/tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..feaaa2d
--- /dev/null
+++ b/res/drawable-hdpi/tab_selected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tab_selected_holo.9.png b/res/drawable-hdpi/tab_selected_holo.9.png
new file mode 100644
index 0000000..b939b5d
--- /dev/null
+++ b/res/drawable-hdpi/tab_selected_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tab_selected_pressed_holo.9.png b/res/drawable-hdpi/tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..ccb7342
--- /dev/null
+++ b/res/drawable-hdpi/tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tab_unselected_focused_holo.9.png b/res/drawable-hdpi/tab_unselected_focused_holo.9.png
new file mode 100644
index 0000000..4f59d32
--- /dev/null
+++ b/res/drawable-hdpi/tab_unselected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tab_unselected_holo.9.png b/res/drawable-hdpi/tab_unselected_holo.9.png
new file mode 100644
index 0000000..de9f4f2
--- /dev/null
+++ b/res/drawable-hdpi/tab_unselected_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/tab_unselected_pressed_holo.9.png b/res/drawable-hdpi/tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..8e706b0
--- /dev/null
+++ b/res/drawable-hdpi/tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_selected_focused_holo.9.png b/res/drawable-mdpi/tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..ffe76c7
--- /dev/null
+++ b/res/drawable-mdpi/tab_selected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_selected_holo.9.png b/res/drawable-mdpi/tab_selected_holo.9.png
new file mode 100644
index 0000000..6ccbd47
--- /dev/null
+++ b/res/drawable-mdpi/tab_selected_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_selected_pressed_holo.9.png b/res/drawable-mdpi/tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..834b1f5
--- /dev/null
+++ b/res/drawable-mdpi/tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_unselected_focused_holo.9.png b/res/drawable-mdpi/tab_unselected_focused_holo.9.png
new file mode 100644
index 0000000..9cf9398
--- /dev/null
+++ b/res/drawable-mdpi/tab_unselected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_unselected_holo.9.png b/res/drawable-mdpi/tab_unselected_holo.9.png
new file mode 100644
index 0000000..5834c1f
--- /dev/null
+++ b/res/drawable-mdpi/tab_unselected_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/tab_unselected_pressed_holo.9.png b/res/drawable-mdpi/tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..b205bc7
--- /dev/null
+++ b/res/drawable-mdpi/tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_focused_holo.9.png b/res/drawable-xhdpi/tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..8bb6ec5
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_holo.9.png b/res/drawable-xhdpi/tab_selected_holo.9.png
new file mode 100644
index 0000000..81d5b34
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_selected_pressed_holo.9.png b/res/drawable-xhdpi/tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..9ae1441
--- /dev/null
+++ b/res/drawable-xhdpi/tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_focused_holo.9.png b/res/drawable-xhdpi/tab_unselected_focused_holo.9.png
new file mode 100644
index 0000000..5973936
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_focused_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_holo.9.png b/res/drawable-xhdpi/tab_unselected_holo.9.png
new file mode 100644
index 0000000..1590ba8
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png b/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..b781355
--- /dev/null
+++ b/res/drawable-xhdpi/tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/res/drawable/action_bar_tab.xml b/res/drawable/action_bar_tab.xml
new file mode 100644
index 0000000..7676549
--- /dev/null
+++ b/res/drawable/action_bar_tab.xml
@@ -0,0 +1,44 @@
+<?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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:state_pressed="true"
+ android:state_selected="true"
+ android:drawable="@drawable/tab_selected_pressed_holo"/>
+ <item
+ android:state_focused="true"
+ android:state_selected="true"
+ android:drawable="@drawable/tab_selected_focused_holo"/>
+ <item
+ android:state_focused="true"
+ android:state_selected="false"
+ android:drawable="@drawable/tab_unselected_focused_holo"/>
+ <item
+ android:state_pressed="true"
+ android:state_selected="false"
+ android:drawable="@drawable/tab_unselected_pressed_holo"/>
+ <item
+ android:state_focused="false"
+ android:state_selected="true"
+ android:state_pressed="false"
+ android:drawable="@drawable/tab_selected_holo"/>
+ <item
+ android:state_focused="false"
+ android:state_pressed="false"
+ android:state_selected="false"
+ android:drawable="@drawable/tab_unselected_holo"/>
+</selector>
\ No newline at end of file
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_container.xml b/res/layout-sw580dp-w1000dp/contact_detail_container.xml
index 1d4ea35..6b1d094 100644
--- a/res/layout-sw580dp-w1000dp/contact_detail_container.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_container.xml
@@ -35,7 +35,14 @@
android:id="@+id/about_fragment_container"
android:layout_width="0dip"
android:layout_height="match_parent"
- android:layout_weight="1" />
+ android:layout_weight="3" />
+
+ <!-- Vertical divider -->
+ <View
+ android:layout_width="2dip"
+ android:layout_height="match_parent"
+ android:background="?android:attr/listDivider"
+ />
<!--
Container for the "Updates" fragment on the contact card for a contact
@@ -44,7 +51,8 @@
-->
<FrameLayout
android:id="@+id/updates_fragment_container"
- android:layout_width="306dip"
+ android:layout_width="0dip"
+ android:layout_weight="2"
android:layout_height="match_parent" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-sw580dp-w1000dp/contact_editor_activity.xml b/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
new file mode 100644
index 0000000..d2e0d22
--- /dev/null
+++ b/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
@@ -0,0 +1,48 @@
+<?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.
+-->
+
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+
+ <!-- Empty view to represent the left margin -->
+ <View
+ android:layout_height="match_parent"
+ android:layout_width="0dip"
+ android:layout_weight="2" />
+
+ <fragment class="com.android.contacts.editor.ContactEditorFragment"
+ android:id="@+id/contact_editor_fragment"
+ android:layout_width="0dip"
+ android:layout_weight="6"
+ android:layout_height="match_parent"/>
+
+ <!-- Empty view to represent the right margin -->
+ <View
+ android:layout_height="match_parent"
+ android:layout_width="0dip"
+ android:layout_weight="2" />
+
+ </LinearLayout>
+
+</ScrollView>
\ No newline at end of file
diff --git a/res/layout-sw580dp-w1000dp/group_detail_fragment.xml b/res/layout-sw580dp-w1000dp/group_detail_fragment.xml
index 11779cb..31d3ce1 100644
--- a/res/layout-sw580dp-w1000dp/group_detail_fragment.xml
+++ b/res/layout-sw580dp-w1000dp/group_detail_fragment.xml
@@ -27,21 +27,22 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="@dimen/group_detail_vertical_padding"
+ android:paddingTop="12dip"
+ android:paddingBottom="12dip"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:paddingLeft="@dimen/group_detail_border_padding"
android:orientation="vertical" >
<TextView
android:id="@+id/group_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/group_detail_border_padding"
- android:paddingTop="@dimen/group_detail_vertical_padding"
+ android:paddingLeft="8dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
@@ -49,7 +50,7 @@
android:id="@+id/group_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/group_detail_border_padding"
+ android:paddingLeft="8dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorSecondary" />
@@ -67,10 +68,9 @@
<View
android:layout_width="match_parent"
android:layout_height="1dip"
- android:background="?android:attr/listDivider"
- android:layout_marginBottom="@dimen/group_detail_vertical_padding"
- android:layout_marginLeft="@dimen/group_detail_divider_margin"
- android:layout_marginRight="@dimen/group_detail_divider_margin" />
+ android:background="@color/people_app_theme_color"
+ android:layout_marginLeft="@dimen/group_detail_border_padding"
+ android:layout_marginRight="@dimen/group_detail_border_padding" />
<!-- List of group members -->
<ListView android:id="@android:id/list"
diff --git a/res/layout-sw580dp-w1000dp/people_activity.xml b/res/layout-sw580dp-w1000dp/people_activity.xml
new file mode 100644
index 0000000..7d8d064
--- /dev/null
+++ b/res/layout-sw580dp-w1000dp/people_activity.xml
@@ -0,0 +1,162 @@
+<?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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.contacts.widget.InterpolatingLayout
+ android:id="@+id/main_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:splitMotionEvents="true">
+
+ <LinearLayout
+ android:id="@+id/browse_view"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:minWidth="100dip"
+ ex:layout_narrowParentWidth="1000dip"
+ ex:layout_narrowWidth="276dip"
+ ex:layout_wideParentWidth="1280dip"
+ ex:layout_wideWidth="376dip"
+ android:background="@drawable/list_background_holo"
+ android:visibility="gone">
+
+ <!-- All -->
+ <fragment
+ android:id="@+id/all_fragment"
+ class="com.android.contacts.list.DefaultContactBrowseListFragment"
+ android:layout_height="0dip"
+ android:layout_width="match_parent"
+ android:layout_weight="1" />
+
+ <!-- Groups -->
+ <fragment
+ android:id="@+id/groups_fragment"
+ class="com.android.contacts.group.GroupBrowseListFragment"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent" />
+ </LinearLayout>
+
+ <view
+ class="com.android.contacts.widget.TransitionAnimationView"
+ android:id="@+id/details_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowMarginLeft="0dip"
+ ex:layout_narrowMarginRight="0dip"
+ ex:layout_wideParentWidth="1280dip"
+ ex:layout_wideMarginLeft="0dip"
+ ex:layout_wideMarginRight="0dip"
+ ex:clipMarginLeft="0dip"
+ ex:clipMarginTop="3dip"
+ ex:clipMarginRight="3dip"
+ ex:clipMarginBottom="9dip"
+ ex:enterAnimation="@android:animator/fade_in"
+ ex:exitAnimation="@android:animator/fade_out"
+ ex:animationDuration="200"
+ android:visibility="gone">
+
+ <!-- This layout includes all possible views needed for a contact detail page -->
+ <include
+ android:id="@+id/contact_detail_container"
+ layout="@layout/contact_detail_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+
+ <!-- This invisible worker fragment loads the contact's details -->
+ <fragment
+ android:id="@+id/contact_detail_loader_fragment"
+ class="com.android.contacts.detail.ContactLoaderFragment"
+ android:layout_height="0dip"
+ android:layout_width="0dip"
+ android:visibility="gone"/>
+
+ <!-- This is the group detail page -->
+ <fragment
+ android:id="@+id/group_detail_fragment"
+ class="com.android.contacts.group.GroupDetailFragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+ </view>
+
+ <view
+ class="com.android.contacts.widget.TransitionAnimationView"
+ android:id="@+id/favorites_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ ex:clipMarginLeft="0dip"
+ ex:clipMarginTop="3dip"
+ ex:clipMarginRight="3dip"
+ ex:clipMarginBottom="9dip"
+ ex:enterAnimation="@android:animator/fade_in"
+ ex:exitAnimation="@android:animator/fade_out"
+ ex:animationDuration="200">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/list_background_holo">
+
+ <!-- Starred -->
+ <fragment
+ android:id="@+id/favorites_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
+ android:layout_height="match_parent"
+ style="@style/FavoritesFragmentStyle"
+ android:layout_marginTop="32dip"
+ android:layout_marginLeft="32dip"
+ android:layout_marginRight="32dip" />
+
+ <!-- Most Frequent -->
+ <fragment
+ android:id="@+id/frequent_fragment"
+ class="com.android.contacts.list.ContactTileListFragment"
+ style="@style/FrequentFragmentStyle"
+ android:layout_height="match_parent"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"/>
+ </LinearLayout>
+ </view>
+
+ </com.android.contacts.widget.InterpolatingLayout>
+
+ <com.android.contacts.widget.InterpolatingLayout
+ android:id="@+id/contacts_unavailable_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone">
+
+ <FrameLayout
+ android:id="@+id/contacts_unavailable_container"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowMarginLeft="80dip"
+ ex:layout_narrowMarginRight="80dip"
+ ex:layout_wideParentWidth="1280dip"
+ ex:layout_wideMarginLeft="200dip"
+ ex:layout_wideMarginRight="200dip"
+ android:paddingBottom="20dip" />
+
+ </com.android.contacts.widget.InterpolatingLayout>
+</FrameLayout>
diff --git a/res/layout-sw580dp/contact_editor_activity.xml b/res/layout-sw580dp/contact_editor_activity.xml
index b9f98a3..c33a3c0 100644
--- a/res/layout-sw580dp/contact_editor_activity.xml
+++ b/res/layout-sw580dp/contact_editor_activity.xml
@@ -16,23 +16,13 @@
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
- <com.android.contacts.widget.InterpolatingLayout
+
+ <fragment class="com.android.contacts.editor.ContactEditorFragment"
+ android:id="@+id/contact_editor_fragment"
android:layout_width="match_parent"
- android:layout_height="match_parent">
- <fragment class="com.android.contacts.editor.ContactEditorFragment"
- android:id="@+id/contact_editor_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- ex:layout_wideParentWidth="1280dip"
- ex:layout_wideMarginLeft="160dip"
- ex:layout_wideMarginRight="160dip"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowMarginLeft="0dip"
- ex:layout_narrowMarginRight="0dip"
- />
- </com.android.contacts.widget.InterpolatingLayout>
+ android:layout_height="match_parent"/>
+
</ScrollView>
diff --git a/res/layout-sw580dp/contact_editor_fragment.xml b/res/layout-sw580dp/contact_editor_fragment.xml
index 0d01214..988be2a 100644
--- a/res/layout-sw580dp/contact_editor_fragment.xml
+++ b/res/layout-sw580dp/contact_editor_fragment.xml
@@ -14,12 +14,23 @@
limitations under the License.
-->
-<LinearLayout
+<com.android.contacts.widget.InterpolatingLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:id="@+id/editors"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/panel_message"
- android:orientation="vertical"
-/>
+ android:background="@drawable/panel_message">
+
+ <LinearLayout
+ android:id="@+id/editors"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ ex:layout_wideParentWidth="800dip"
+ ex:layout_wideMarginLeft="128dip"
+ ex:layout_wideMarginRight="128dip"
+ ex:layout_narrowParentWidth="600dip"
+ ex:layout_narrowMarginLeft="50dip"
+ ex:layout_narrowMarginRight="50dip"/>
+
+</com.android.contacts.widget.InterpolatingLayout>
\ No newline at end of file
diff --git a/res/layout-sw580dp/event_field_editor_view.xml b/res/layout-sw580dp/event_field_editor_view.xml
deleted file mode 100644
index 822de37..0000000
--- a/res/layout-sw580dp/event_field_editor_view.xml
+++ /dev/null
@@ -1,51 +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.
--->
-
-<!-- Editor for a single event entry in the contact editor -->
-
-<com.android.contacts.editor.EventFieldEditorView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:gravity="bottom"
- android:focusable="true"
- android:clickable="true">
-
- <include
- android:id="@+id/date_view"
- layout="@layout/edit_date_picker" />
-
- <include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:visibility="gone" />
-
- <include
- android:id="@+id/delete_button_container"
- layout="@layout/edit_delete_button"
- android:visibility="gone" />
-
- </LinearLayout>
-
-</com.android.contacts.editor.EventFieldEditorView>
diff --git a/res/layout-sw580dp/external_raw_contact_editor_view.xml b/res/layout-sw580dp/external_raw_contact_editor_view.xml
deleted file mode 100644
index fba5220..0000000
--- a/res/layout-sw580dp/external_raw_contact_editor_view.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<com.android.contacts.editor.ExternalRawContactEditorView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <include
- layout="@layout/editor_account_header" />
-
- <LinearLayout
- android:id="@+id/body"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="10dip">
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <FrameLayout
- android:id="@+id/stub_photo"
- android:layout_width="96dip"
- android:layout_height="96dip"
- android:layout_gravity="top|left"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="96dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="15dip">
-
- <include
- android:id="@+id/edit_photo"
- layout="@layout/item_photo_editor" />
-
- </FrameLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginRight="48dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginRight="15dip"
- android:orientation="vertical">
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:background="@color/contact_detail_header_divider_color" />
-
- <TextView
- android:id="@+id/read_only_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
- android:layout_marginRight="48dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="4dip"
- android:paddingRight="?android:attr/scrollbarSize"
- android:textSize="@dimen/contact_name_text_size" />
- </LinearLayout>
- </com.android.contacts.widget.InterpolatingLayout>
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="96dip"
- ex:layout_wideMarginRight="96dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="15dip"
- ex:layout_narrowMarginRight="15dip">
-
- <TextView
- android:id="@+id/read_only_warning"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="13dip"
- android:layout_marginBottom="13dip"
- android:layout_marginLeft="13dip"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorPrimary"
- android:drawableLeft="?android:attr/alertDialogIcon"
- android:drawablePadding="10dip"
- android:gravity="center_vertical" />
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:background="?android:attr/listDivider" />
-
- <LinearLayout
- android:id="@+id/sect_general"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" />
- </LinearLayout>
- </com.android.contacts.widget.InterpolatingLayout>
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:layout_marginBottom="42dip">
- <Button
- android:id="@+id/button_edit_externally"
- android:text="@string/edit_contact"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="246dip"
- ex:layout_wideMarginRight="156dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="165dip"
- ex:layout_narrowMarginRight="121dip"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
- </com.android.contacts.widget.InterpolatingLayout>
- </LinearLayout>
-</com.android.contacts.editor.ExternalRawContactEditorView>
diff --git a/res/layout-sw580dp/group_detail_fragment.xml b/res/layout-sw580dp/group_detail_fragment.xml
index a7db154..c11337f 100644
--- a/res/layout-sw580dp/group_detail_fragment.xml
+++ b/res/layout-sw580dp/group_detail_fragment.xml
@@ -21,14 +21,16 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:paddingLeft="@dimen/group_detail_border_padding"
+ android:paddingRight="@dimen/group_detail_border_padding"
android:background="@drawable/panel_content">
<TextView
android:id="@+id/group_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/group_detail_border_padding"
- android:paddingTop="@dimen/group_detail_vertical_padding"
+ android:paddingLeft="8dip"
+ android:paddingTop="12dip"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold" />
@@ -36,31 +38,25 @@
android:id="@+id/group_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/group_detail_border_padding"
+ android:paddingLeft="8dip"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorTertiary" />
<View
android:layout_width="match_parent"
android:layout_height="1dip"
- android:background="?android:attr/listDivider"
- android:layout_marginTop="@dimen/group_detail_vertical_padding"
- android:layout_marginBottom="@dimen/group_detail_vertical_padding"
- android:layout_marginLeft="@dimen/group_detail_divider_margin"
- android:layout_marginRight="@dimen/group_detail_divider_margin" />
+ android:background="@color/people_app_theme_color"
+ android:layout_marginTop="12dip" />
<FrameLayout
android:id="@+id/group_source_view_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:paddingLeft="@dimen/group_detail_border_padding" />
+ android:layout_gravity="center_vertical" />
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/group_detail_border_padding"
- android:layout_marginRight="@dimen/group_detail_border_padding"
android:cacheColorHint="#00000000"
android:divider="@null" />
diff --git a/res/layout-sw580dp/item_group_membership.xml b/res/layout-sw580dp/item_group_membership.xml
deleted file mode 100644
index 985b7ae..0000000
--- a/res/layout-sw580dp/item_group_membership.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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 body surrounding all editors for a specific kind -->
-
-<com.android.contacts.editor.GroupMembershipView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="@dimen/editor_min_line_item_height"
- android:orientation="horizontal">
-
- <TextView
- android:id="@+id/kind_title"
- android:layout_width="@dimen/editor_title_label_width"
- android:layout_height="@dimen/editor_min_line_item_height"
- android:gravity="center_vertical"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:singleLine="true"
- android:textColor="@color/editor_label_text_color"
- android:ellipsize="marquee" />
-
- <Button
- style="?android:attr/spinnerStyle"
- android:id="@+id/group_list"
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:gravity="left|center_vertical"
- android:ellipsize="end"
- android:focusable="true"
- android:paddingLeft="18dip"
- />
-
- <!-- Plus/Minus button only for layout. This makes the editor lay out nicely with the other fields -->
- <ImageButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/editor_round_button_padding_left"
- android:paddingRight="@dimen/editor_round_button_padding_right"
- android:paddingTop="@dimen/editor_round_button_padding_top"
- android:paddingBottom="@dimen/editor_round_button_padding_bottom"
- android:src="@drawable/ic_menu_add_field_holo_light"
- android:background="@null"
- android:visibility="invisible" />
- <ImageButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/editor_round_button_padding_left"
- android:paddingRight="@dimen/editor_round_button_padding_right"
- android:paddingTop="@dimen/editor_round_button_padding_top"
- android:paddingBottom="@dimen/editor_round_button_padding_bottom"
- android:src="@drawable/ic_menu_remove_field_holo_light"
- android:background="@null"
- android:visibility="invisible" />
-</com.android.contacts.editor.GroupMembershipView>
diff --git a/res/layout-sw580dp/people_activity.xml b/res/layout-sw580dp/people_activity.xml
index 8bf627f..35c11b1 100644
--- a/res/layout-sw580dp/people_activity.xml
+++ b/res/layout-sw580dp/people_activity.xml
@@ -20,23 +20,19 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <com.android.contacts.widget.InterpolatingLayout
+ <LinearLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="8dip"
+ android:orientation="horizontal"
android:splitMotionEvents="true">
<LinearLayout
android:id="@+id/browse_view"
- android:layout_width="wrap_content"
+ android:layout_width="0dip"
android:layout_height="match_parent"
+ android:layout_weight="1"
android:orientation="vertical"
- android:minWidth="100dip"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowWidth="310dip"
- ex:layout_wideParentWidth="1280dip"
- ex:layout_wideWidth="430dip"
android:background="@drawable/list_background_holo"
android:visibility="gone">
@@ -59,14 +55,9 @@
<view
class="com.android.contacts.widget.TransitionAnimationView"
android:id="@+id/details_view"
- android:layout_width="match_parent"
+ android:layout_width="0dip"
android:layout_height="match_parent"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowMarginLeft="0dip"
- ex:layout_narrowMarginRight="0dip"
- ex:layout_wideParentWidth="1280dip"
- ex:layout_wideMarginLeft="0dip"
- ex:layout_wideMarginRight="0dip"
+ android:layout_weight="1"
ex:clipMarginLeft="0dip"
ex:clipMarginTop="3dip"
ex:clipMarginRight="3dip"
@@ -105,19 +96,13 @@
android:id="@+id/favorites_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowMarginRight="0dip"
- ex:layout_wideParentWidth="1280dip"
- ex:layout_wideMarginRight="48dip"
ex:clipMarginLeft="0dip"
ex:clipMarginTop="3dip"
ex:clipMarginRight="3dip"
ex:clipMarginBottom="9dip"
ex:enterAnimation="@android:animator/fade_in"
ex:exitAnimation="@android:animator/fade_out"
- ex:animationDuration="200"
- android:paddingTop="32dip"
- android:paddingRight="32dip">
+ ex:animationDuration="200">
<LinearLayout
android:layout_width="match_parent"
@@ -129,20 +114,23 @@
android:id="@+id/favorites_fragment"
class="com.android.contacts.list.ContactTileListFragment"
android:layout_height="match_parent"
- android:layout_width="0dip"
- android:layout_weight="2" />
+ style="@style/FavoritesFragmentStyle"
+ android:layout_marginTop="32dip"
+ android:layout_marginLeft="32dip"
+ android:layout_marginRight="32dip" />
<!-- Most Frequent -->
<fragment
android:id="@+id/frequent_fragment"
class="com.android.contacts.list.ContactTileListFragment"
+ style="@style/FrequentFragmentStyle"
android:layout_height="match_parent"
- android:layout_width="0dip"
- android:layout_weight="1" />
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"/>
</LinearLayout>
</view>
- </com.android.contacts.widget.InterpolatingLayout>
+ </LinearLayout>
<com.android.contacts.widget.InterpolatingLayout
android:id="@+id/contacts_unavailable_view"
diff --git a/res/layout-sw580dp/phonetic_name_editor_view.xml b/res/layout-sw580dp/phonetic_name_editor_view.xml
deleted file mode 100644
index f27c1fc..0000000
--- a/res/layout-sw580dp/phonetic_name_editor_view.xml
+++ /dev/null
@@ -1,59 +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.
--->
-
-<com.android.contacts.editor.PhoneticNameEditorView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:orientation="vertical"
- android:paddingRight="?android:attr/scrollbarSize"
- android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
- android:layout_marginRight="48dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="4dip">
-
- <include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:visibility="gone" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:gravity="center_vertical"
- android:focusable="true"
- android:clickable="true">
-
- <include
- android:id="@+id/editors"
- layout="@layout/edit_field_list" />
-
- <include
- android:id="@+id/expansion_view_container"
- layout="@layout/edit_expansion_view"
- android:visibility="gone" />
-
- <include
- android:id="@+id/delete_button_container"
- layout="@layout/edit_delete_button"
- android:visibility="gone" />
-
- </LinearLayout>
-
-</com.android.contacts.editor.PhoneticNameEditorView>
diff --git a/res/layout-sw580dp/raw_contact_editor_view.xml b/res/layout-sw580dp/raw_contact_editor_view.xml
deleted file mode 100644
index 11fc161..0000000
--- a/res/layout-sw580dp/raw_contact_editor_view.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<com.android.contacts.editor.RawContactEditorView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <include
- layout="@layout/editor_account_header" />
-
- <LinearLayout
- android:id="@+id/body"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="10dip">
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <FrameLayout
- android:id="@+id/stub_photo"
- android:layout_width="96dip"
- android:layout_height="96dip"
- android:layout_gravity="top|left"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="96dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="20dip">
-
- <include
- android:id="@+id/edit_photo"
- layout="@layout/item_photo_editor" />
-
- </FrameLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginRight="48dip"
- ex:layout_wideMarginLeft="10dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginRight="15dip"
- ex:layout_narrowMarginLeft="5dip"
- android:orientation="vertical">
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:background="@color/contact_detail_header_divider_color" />
-
- <include
- android:id="@+id/edit_name"
- layout="@layout/structured_name_editor_view" />
-
- <include
- android:id="@+id/edit_phonetic_name"
- layout="@layout/phonetic_name_editor_view" />
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
- android:layout_marginRight="48dip">
- <ViewStub
- android:id="@+id/aggregation_suggestion_stub"
- android:inflatedId="@+id/aggregation_suggestion"
- android:layout="@layout/aggregation_suggestions"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible" />
- </FrameLayout>
- </LinearLayout>
- </com.android.contacts.widget.InterpolatingLayout>
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="96dip"
- ex:layout_wideMarginRight="48dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="25dip"
- ex:layout_narrowMarginRight="10dip">
-
- <LinearLayout
- android:id="@+id/sect_fields"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingRight="@dimen/editor_name_text_field_right_margin" />
- </LinearLayout>
- </com.android.contacts.widget.InterpolatingLayout>
-
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="32dip">
- <Button
- android:id="@+id/button_add_field"
- android:text="@string/add_field"
- ex:layout_wideParentWidth="960dip"
- ex:layout_wideMarginLeft="246dip"
- ex:layout_wideMarginRight="156dip"
- ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
- ex:layout_narrowMarginLeft="165dip"
- ex:layout_narrowMarginRight="121dip"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
- </com.android.contacts.widget.InterpolatingLayout>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="1px"
- android:layout_alignParentBottom="true"
- android:background="?android:attr/listDivider" />
- </LinearLayout>
-</com.android.contacts.editor.RawContactEditorView>
diff --git a/res/layout-sw580dp/structured_name_editor_view.xml b/res/layout-sw580dp/structured_name_editor_view.xml
deleted file mode 100644
index 97e222e..0000000
--- a/res/layout-sw580dp/structured_name_editor_view.xml
+++ /dev/null
@@ -1,58 +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.
--->
-
-<com.android.contacts.editor.StructuredNameEditorView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:orientation="vertical"
- android:paddingRight="?android:attr/scrollbarSize"
- android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
- android:layout_marginRight="48dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="4dip">
-
- <include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:visibility="gone" />
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:focusable="true"
- android:clickable="true">
-
- <include
- android:id="@+id/editors"
- layout="@layout/edit_field_list" />
-
- <include
- android:id="@+id/expansion_view_container"
- layout="@layout/edit_expansion_view"
- android:visibility="gone" />
-
- <include
- android:id="@+id/delete_button_container"
- layout="@layout/edit_delete_button"
- android:visibility="gone" />
-
- </LinearLayout>
-
-</com.android.contacts.editor.StructuredNameEditorView>
diff --git a/res/layout-sw580dp/text_fields_editor_view.xml b/res/layout-sw580dp/text_fields_editor_view.xml
index be0ea67..ecc9dd2 100644
--- a/res/layout-sw580dp/text_fields_editor_view.xml
+++ b/res/layout-sw580dp/text_fields_editor_view.xml
@@ -18,7 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
+ android:layout_marginTop="-4dip"
android:orientation="vertical">
<LinearLayout
@@ -26,7 +26,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal"
- android:gravity="top"
+ android:gravity="center_vertical"
android:focusable="true"
android:clickable="true">
@@ -35,14 +35,13 @@
layout="@layout/edit_field_list" />
<include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:paddingTop="15dip"
+ android:id="@+id/expansion_view_container"
+ layout="@layout/edit_expansion_view"
android:visibility="gone" />
<include
- android:id="@+id/expansion_view_container"
- layout="@layout/edit_expansion_view"
+ android:id="@+id/spinner"
+ layout="@layout/edit_spinner"
android:visibility="gone" />
<include
diff --git a/res/layout/contact_detail_tab_carousel.xml b/res/layout/contact_detail_tab_carousel.xml
index fe167d1..fb60f17 100644
--- a/res/layout/contact_detail_tab_carousel.xml
+++ b/res/layout/contact_detail_tab_carousel.xml
@@ -28,10 +28,18 @@
android:layout_height="match_parent"
android:orientation="horizontal">
+ <!-- "About" tab -->
<include
android:id="@+id/tab_about"
layout="@layout/carousel_about_tab" />
+ <!-- Vertical divider -->
+ <View
+ android:layout_width="2dip"
+ android:layout_height="match_parent"
+ android:background="@android:color/white"/>
+
+ <!-- "Updates" tab -->
<include
android:id="@+id/tab_update"
layout="@layout/carousel_updates_tab" />
diff --git a/res/layout/contact_tile_frequent.xml b/res/layout/contact_tile_frequent.xml
index fc9c04c..14cb04e 100644
--- a/res/layout/contact_tile_frequent.xml
+++ b/res/layout/contact_tile_frequent.xml
@@ -52,7 +52,7 @@
android:id="@+id/contact_tile_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ android:textSize="14sp"
android:ellipsize="end"
android:singleLine="true"
android:textColor="#cccccc"
diff --git a/res/layout/contact_tile_frequent_phone.xml b/res/layout/contact_tile_frequent_phone.xml
index e0ea0fb..50c1fc2 100644
--- a/res/layout/contact_tile_frequent_phone.xml
+++ b/res/layout/contact_tile_frequent_phone.xml
@@ -47,11 +47,11 @@
android:id="@+id/contact_tile_phone_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ android:textSize="14sp"
android:ellipsize="end"
android:singleLine="true"
- android:textColor="#cccccc"
- android:layout_marginLeft="12dip"
+ android:textColor="@color/dialtacts_secondary_text_color"
+ android:layout_marginLeft="8dip"
android:layout_toRightOf="@id/contact_tile_quick"
android:layout_below="@id/contact_tile_name" />
@@ -59,14 +59,30 @@
android:id="@+id/contact_tile_phone_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="12sp"
+ android:textSize="14sp"
android:ellipsize="end"
android:singleLine="true"
- android:textColor="#cccccc"
+ android:textAllCaps="true"
+ android:textColor="@color/dialtacts_secondary_text_color"
android:layout_marginLeft="12dip"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/contact_tile_phone_number" />
+ <View
+ android:id="@+id/contact_tile_horizontal_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="?android:attr/listDivider"
+ android:layout_alignParentBottom="true" />
+
+ <View
+ android:id="@+id/contact_tile_horizontal_picture_divider"
+ android:layout_width="64dip"
+ android:layout_height="1dip"
+ android:background="@android:color/black"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true" />
+
</RelativeLayout>
</view>
diff --git a/res/layout/contact_tile_starred.xml b/res/layout/contact_tile_starred.xml
index d667a34..3b74946 100644
--- a/res/layout/contact_tile_starred.xml
+++ b/res/layout/contact_tile_starred.xml
@@ -61,7 +61,7 @@
android:layout_marginLeft="4dip"
style="@style/ContactTileStatusText" />
- <ImageButton
+ <ImageButton
android:id="@+id/contact_tile_push_state"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/layout/contact_tile_starred_secondary_target.xml b/res/layout/contact_tile_starred_secondary_target.xml
index 887fa5d..3558166 100644
--- a/res/layout/contact_tile_starred_secondary_target.xml
+++ b/res/layout/contact_tile_starred_secondary_target.xml
@@ -61,14 +61,14 @@
</FrameLayout>
<View
- android:id="@+id/vertical_divider"
+ android:id="@+id/secondary_vertical_divider"
android:layout_width="1dip"
- android:layout_height="24dip"
+ android:layout_height="32dip"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
- android:layout_marginBottom="12dip"
android:layout_marginRight="44dip"
- android:background="?android:attr/dividerVertical" />
+ android:layout_marginBottom="8dip"
+ android:background="@drawable/ic_divider_dashed_holo_dark" />
<ImageButton
android:id="@+id/contact_tile_push_state"
@@ -78,14 +78,28 @@
<ImageButton
android:id="@+id/contact_tile_secondary_button"
- android:src="@drawable/ic_tab_unselected_contacts"
+ android:src="@drawable/ic_contacts_holo_dark"
android:background="?android:attr/selectableItemBackground"
android:layout_height="@dimen/contact_tile_shadowbox_height"
- android:layout_width="32dip"
+ android:layout_width="48dip"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip" />
+ android:paddingRight="8dip"
+ android:paddingLeft="8dip" />
+
+ <View
+ android:id="@+id/contact_tile_vertical_divider"
+ android:layout_height="match_parent"
+ android:layout_width="2dip"
+ android:background="@color/phone_contact_tile_divider_color"
+ android:layout_alignParentRight="true" />
+
+ <View
+ android:id="@+id/contact_tile_horizontal_divider"
+ android:layout_width="match_parent"
+ android:layout_height="2dip"
+ android:background="@color/phone_contact_tile_divider_color"
+ android:layout_alignParentBottom="true" />
</RelativeLayout>
diff --git a/res/layout/edit_add_field.xml b/res/layout/edit_add_field.xml
index b17185d..0b62ac1 100644
--- a/res/layout/edit_add_field.xml
+++ b/res/layout/edit_add_field.xml
@@ -17,8 +17,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="48dip"
- android:paddingLeft="16dip"
+ android:minHeight="40dip"
+ android:paddingLeft="@dimen/editor_add_field_label_left_padding"
android:background="?android:attr/selectableItemBackground">
<TextView
android:id="@+id/add_text"
diff --git a/res/layout/edit_delete_button.xml b/res/layout/edit_delete_button.xml
index f05b0e4..ed3f4d6 100644
--- a/res/layout/edit_delete_button.xml
+++ b/res/layout/edit_delete_button.xml
@@ -19,12 +19,13 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/editor_min_line_item_height"
android:layout_gravity="top">
<ImageView
android:id="@+id/delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_gravity="center"
android:duplicateParentState="true"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_menu_remove_field_holo_light"
diff --git a/res/layout/edit_kind_title.xml b/res/layout/edit_kind_title.xml
index 0f755ee..8901d5b 100644
--- a/res/layout/edit_kind_title.xml
+++ b/res/layout/edit_kind_title.xml
@@ -24,14 +24,15 @@
android:minHeight="24dip"
android:paddingLeft="8dip"
android:paddingRight="8dip"
+ android:paddingBottom="4dip"
android:orientation="vertical">
<TextView
android:id="@+id/kind_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="8dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:paddingLeft="@dimen/editor_kind_title_left_padding"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/people_app_theme_color"
android:textStyle="bold"
android:textAllCaps="true"
diff --git a/res/layout/edit_spinner.xml b/res/layout/edit_spinner.xml
index 37edcbd..0f3ed23 100644
--- a/res/layout/edit_spinner.xml
+++ b/res/layout/edit_spinner.xml
@@ -22,6 +22,6 @@
android:id="@+id/spinner"
android:layout_gravity="top"
android:layout_width="@dimen/editor_type_label_width"
- android:layout_height="wrap_content"
- android:paddingLeft="5dip"
+ android:layout_height="@dimen/editor_min_line_item_height"
+ android:paddingLeft="8dip"
android:paddingRight="20dip"/>
\ No newline at end of file
diff --git a/res/layout/external_raw_contact_editor_view.xml b/res/layout/external_raw_contact_editor_view.xml
index 6f39b34..24e8322 100644
--- a/res/layout/external_raw_contact_editor_view.xml
+++ b/res/layout/external_raw_contact_editor_view.xml
@@ -19,7 +19,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:paddingBottom="32dip">
<include
layout="@layout/editor_account_header" />
@@ -28,8 +29,8 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
+ android:paddingTop="8dip"
+ android:paddingLeft="16dip">
<TextView android:id="@+id/read_only_name"
android:layout_width="0dip"
@@ -45,7 +46,8 @@
<FrameLayout
android:id="@+id/stub_photo"
android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:layout_marginRight="8dip">
<include
android:id="@+id/edit_photo"
diff --git a/res/layout/item_photo_editor.xml b/res/layout/item_photo_editor.xml
index 2e73cb2..a41b007 100644
--- a/res/layout/item_photo_editor.xml
+++ b/res/layout/item_photo_editor.xml
@@ -17,13 +17,13 @@
<view
class="com.android.contacts.editor.PhotoEditorView"
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="@dimen/edit_photo_size"
- android:layout_height="@dimen/edit_photo_size"
+ android:layout_width="42dip"
+ android:layout_height="42dip"
>
<ImageView
android:id="@+id/photo"
- android:layout_width="@dimen/edit_photo_size"
- android:layout_height="@dimen/edit_photo_size"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:src="@drawable/ic_contact_picture"
android:cropToPadding="true"
android:scaleType="centerCrop"
@@ -31,8 +31,8 @@
/>
<View
android:id="@+id/frame"
- android:layout_width="@dimen/edit_photo_size"
- android:layout_height="@dimen/edit_photo_size"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:contentDescription="@string/description_contact_photo"
diff --git a/res/layout/list_separator.xml b/res/layout/list_separator.xml
index af83584..7d57ef7 100644
--- a/res/layout/list_separator.xml
+++ b/res/layout/list_separator.xml
@@ -15,8 +15,30 @@
-->
<!-- Layout used for list separators. -->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- style="?android:attr/listSeparatorTextViewStyle"
- android:gravity="left|center_vertical"
- android:id="@+id/header_text"
-/>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:orientation="vertical"
+ android:layout_height="32dip"
+ android:divider="?android:attr/dividerVertical"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dip"
+ android:paddingLeft="8dip"
+ android:textStyle="bold"
+ android:textAllCaps="true"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@color/people_app_theme_color"
+ android:gravity="left|center_vertical"
+ android:id="@+id/header_text" />
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:background="@color/people_app_theme_color" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/organization_editor_view_switcher.xml b/res/layout/organization_editor_view_switcher.xml
index fb21626..810634c 100644
--- a/res/layout/organization_editor_view_switcher.xml
+++ b/res/layout/organization_editor_view_switcher.xml
@@ -23,14 +23,14 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="48dip"
+ android:minHeight="40dip"
android:background="?android:attr/selectableItemBackground">
<TextView
android:id="@+id/add_organization_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="16dip"
+ android:paddingLeft="@dimen/editor_add_field_label_left_padding"
android:paddingRight="16dip"
android:layout_gravity="center_vertical"
android:duplicateParentState="true"
diff --git a/res/layout/phonetic_name_editor_view.xml b/res/layout/phonetic_name_editor_view.xml
index 6084d3f..5846998 100644
--- a/res/layout/phonetic_name_editor_view.xml
+++ b/res/layout/phonetic_name_editor_view.xml
@@ -18,6 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:minHeight="@dimen/editor_min_line_item_height"
android:orientation="vertical">
<include
diff --git a/res/layout/raw_contact_editor_view.xml b/res/layout/raw_contact_editor_view.xml
index b4aa766..b98f4fb 100644
--- a/res/layout/raw_contact_editor_view.xml
+++ b/res/layout/raw_contact_editor_view.xml
@@ -18,7 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:paddingTop="@dimen/editor_padding_top">
<include
layout="@layout/editor_account_header" />
diff --git a/res/layout/structured_name_editor_view.xml b/res/layout/structured_name_editor_view.xml
index 979a0f3..196b079 100644
--- a/res/layout/structured_name_editor_view.xml
+++ b/res/layout/structured_name_editor_view.xml
@@ -18,6 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:minHeight="@dimen/editor_min_line_item_height"
android:orientation="vertical">
<include
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index 89970c6..e63b7da 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -18,6 +18,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="-2dip"
android:orientation="vertical">
<LinearLayout
diff --git a/res/menu-sw580dp-w720dp/actions.xml b/res/menu-sw580dp-w720dp/actions.xml
index 4f0da2c..0b8303a 100644
--- a/res/menu-sw580dp-w720dp/actions.xml
+++ b/res/menu-sw580dp-w720dp/actions.xml
@@ -16,7 +16,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_search"
- android:icon="@android:drawable/ic_menu_search"
+ android:icon="@drawable/ic_ab_search_holo_dark"
android:title="@string/menu_search"
android:showAsAction="always" />
diff --git a/res/menu-sw580dp/actions.xml b/res/menu-sw580dp/actions.xml
index b6cdfbf..8732927 100644
--- a/res/menu-sw580dp/actions.xml
+++ b/res/menu-sw580dp/actions.xml
@@ -16,7 +16,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_search"
- android:icon="@android:drawable/ic_menu_search"
+ android:icon="@drawable/ic_ab_search_holo_dark"
android:title="@string/menu_search"
android:showAsAction="ifRoom" />
diff --git a/res/layout-sw580dp/edit_spinner.xml b/res/values-sw580dp-w1000dp/styles.xml
similarity index 60%
rename from res/layout-sw580dp/edit_spinner.xml
rename to res/values-sw580dp-w1000dp/styles.xml
index f1909fe..85f4733 100644
--- a/res/layout-sw580dp/edit_spinner.xml
+++ b/res/values-sw580dp-w1000dp/styles.xml
@@ -13,15 +13,14 @@
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>
-<!-- Spinner for a field in the contact editor. -->
-
-<Spinner
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/spinner"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/editor_field_left_padding"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:paddingLeft="5dip"
- android:paddingTop="5dip"/>
\ No newline at end of file
+ <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 a6cbb9b..05ac532 100644
--- a/res/values-sw580dp-w720dp/styles.xml
+++ b/res/values-sw580dp-w720dp/styles.xml
@@ -16,6 +16,7 @@
<resources>
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <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>
diff --git a/res/values-sw580dp/dimens.xml b/res/values-sw580dp/dimens.xml
index 7e3fb80..f7c0f05 100644
--- a/res/values-sw580dp/dimens.xml
+++ b/res/values-sw580dp/dimens.xml
@@ -14,14 +14,14 @@
limitations under the License.
-->
<resources>
- <dimen name="edit_photo_size">96dip</dimen>
<dimen name="aggregation_suggestion_icon_size">64dip</dimen>
- <dimen name="editor_type_label_width">180dip</dimen>
+ <dimen name="editor_padding_top">32dip</dimen>
+ <dimen name="editor_type_label_width">122dip</dimen>
<dimen name="editor_field_spinner_text_size">15sp</dimen>
- <dimen name="editor_round_button_padding_left">8dip</dimen>
- <dimen name="editor_round_button_padding_right">8dip</dimen>
- <dimen name="editor_field_top_padding">12dip</dimen>
- <dimen name="editor_field_bottom_padding">12dip</dimen>
+ <dimen name="editor_round_button_padding_left">16dip</dimen>
+ <dimen name="editor_round_button_padding_right">16dip</dimen>
+ <dimen name="editor_kind_title_left_padding">16dip</dimen>
+ <dimen name="editor_add_field_label_left_padding">24dip</dimen>
<dimen name="detail_item_side_margin">0dip</dimen>
<dimen name="detail_item_vertical_margin">16dip</dimen>
<dimen name="detail_item_icon_margin">8dip</dimen>
diff --git a/res/values-sw580dp/styles.xml b/res/values-sw580dp/styles.xml
index b9b87cf..871d566 100644
--- a/res/values-sw580dp/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -16,6 +16,7 @@
<resources>
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <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>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 0005484..6e6cadb 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -95,4 +95,8 @@
<!-- Color of the text for buttons in the action bar -->
<color name="action_bar_button_text_color">#FFFFFF</color>
+
+ <!-- Color of the vertical and horizontal dividers for starred contacts in the Phone app -->
+ <color name="phone_contact_tile_divider_color">#D8000000</color>
+
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 459d0f8..5bc8ea0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -14,8 +14,6 @@
limitations under the License.
-->
<resources>
- <dimen name="edit_photo_size">42dip</dimen>
-
<!-- The height of the ScrollingTabWidget -->
<dimen name="tab_height">40dip</dimen>
<dimen name="account_name_height">25dip</dimen>
@@ -33,12 +31,21 @@
based on the source of the request -->
<dimen name="quick_contact_top_position">48dip</dimen>
+ <!-- Top padding of the entire contact editor -->
+ <dimen name="editor_padding_top">0dip</dimen>
+
<!-- Padding of the rounded plus/minus/expand/collapse buttons in the editor -->
<dimen name="editor_round_button_padding_left">2dip</dimen>
<dimen name="editor_round_button_padding_right">2dip</dimen>
<dimen name="editor_round_button_padding_top">4dip</dimen>
<dimen name="editor_round_button_padding_bottom">4dip</dimen>
+ <!-- Left padding of the kind title in the contact editor -->
+ <dimen name="editor_kind_title_left_padding">8dip</dimen>
+
+ <!-- Left padding of the label in the add field button for the contact editor -->
+ <dimen name="editor_add_field_label_left_padding">16dip</dimen>
+
<!-- Width of the Type-Label in the Editor -->
<dimen name="editor_type_label_width">100dip</dimen>
@@ -48,12 +55,6 @@
<!-- Right padding of a field in the Editor -->
<dimen name="editor_field_right_padding">4dip</dimen>
- <!-- Top padding of a field in the Editor -->
- <dimen name="editor_field_top_padding">10dip</dimen>
-
- <!-- Bottom padding of a field in the Editor -->
- <dimen name="editor_field_bottom_padding">5dip</dimen>
-
<!-- Minimum height of a row in the Editor -->
<dimen name="editor_min_line_item_height">48dip</dimen>
@@ -75,9 +76,6 @@
<!-- Width of the title labels in the contact editor -->
<dimen name="editor_title_label_width">120dip</dimen>
- <!-- Interpolator layout narrow width value of the contact editor -->
- <dimen name="editor_interpolator_narrow_width">600dip</dimen>
-
<!-- Height of the attribution text view in the contact detail header view -->
<dimen name="detail_header_attribution_height">40dip</dimen>
@@ -191,14 +189,8 @@
<!-- Size of group list icons -->
<dimen name="group_list_icon_size">32dip</dimen>
- <!-- Border padding for the group detail fragment header -->
- <dimen name="group_detail_border_padding">20dip</dimen>
-
- <!-- Vertical padding for the group detail fragment header -->
- <dimen name="group_detail_vertical_padding">15dip</dimen>
-
- <!-- Margins for the group detail fragment divider in the header -->
- <dimen name="group_detail_divider_margin">15dip</dimen>
+ <!-- Border padding for the group detail fragment -->
+ <dimen name="group_detail_border_padding">32dip</dimen>
<!-- Height of the member list in the group editor -->
<dimen name="group_editor_member_list_height">550dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index a49ab77..cf7310c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -110,10 +110,10 @@
<string name="menu_removeStar">Remove from favorites</string>
<!-- Menu item used to edit a specific contact -->
- <string name="menu_editContact">Edit contact</string>
+ <string name="menu_editContact">Edit</string>
<!-- Menu item used to delete a specific contact -->
- <string name="menu_deleteContact">Delete contact</string>
+ <string name="menu_deleteContact">Delete</string>
<!-- Menu item used to call a specific contact when viewing the details of that contact. -->
<string name="menu_call">Call contact</string>
@@ -182,7 +182,7 @@
<string name="menu_set_ring_tone">Set ringtone</string>
<!-- Menu item that opens the Options activity for a given contact [CHAR LIMIT=30] -->
- <string name="menu_redirect_calls_to_vm">Redirect calls to voicemail</string>
+ <string name="menu_redirect_calls_to_vm">All calls to voicemail</string>
<!-- Warning dialog contents after users selects to delete a ReadOnly contact. -->
<string name="readOnlyContactWarning">You cannot delete contacts from read-only accounts, but you can hide them in your contacts lists.</string>
@@ -205,12 +205,6 @@
<!-- Menu item to indicate you want to stop editing a contact and NOT save the changes you've made [CHAR LIMIT=12] -->
<string name="menu_discard">Discard</string>
- <!-- The title of the activity that edits and existing contact -->
- <string name="editContact_title_edit">Edit contact</string>
-
- <!-- The title of the activity that creates a new contact -->
- <string name="editContact_title_insert">New contact</string>
-
<!-- The label describing the phonetic pronunciation/reading of a contact name [CHAR LIMIT=20] -->
<string name="label_phonetic_name">Phonetic</string>
@@ -1040,7 +1034,7 @@
<string name="dialog_import_export">Import/Export contacts</string>
<!-- The menu item to share the currently viewed contact [CHAR LIMIT=30] -->
- <string name="menu_share">Share contact</string>
+ <string name="menu_share">Share</string>
<!-- Dialog title when picking the application to share a contact with. -->
<string name="share_via">Share contact via</string>
@@ -1603,12 +1597,6 @@
<!-- 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>
- <!-- The title of the activity that creates a new group [CHAR LIMIT=NONE] -->
- <string name="editGroup_title_insert">New group</string>
-
- <!-- The title of the activity that edits an existing group [CHAR LIMIT=NONE] -->
- <string name="editGroup_title_edit">Edit group</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>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 423466f..a137361 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -123,6 +123,7 @@
<style name="PeopleTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
+ <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">?android:attr/listPreferredItemHeight</item>
@@ -160,6 +161,10 @@
<item name="android:backgroundStacked">@drawable/ab_solid_custom_blue_inverse_holo</item>
</style>
+ <style name="ContactsActionBarTabView" parent="@android:style/Widget.Holo.ActionBar.TabView">
+ <item name="android:background">@drawable/action_bar_tab</item>
+ </style>
+
<!-- TODO: Clean up this file so themes aren't copied. -->
<style name="GroupDetailTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
@@ -280,8 +285,6 @@
<style name="ContactTileStarred">
<item name="android:focusable">true</item>
- <item name="android:padding">1px</item>
- <item name="android:background">@drawable/list_selector</item>
</style>
<style name="ContactTileStarredName">
@@ -301,6 +304,16 @@
<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/ContactLoader.java b/src/com/android/contacts/ContactLoader.java
index 8416721..064deb5 100644
--- a/src/com/android/contacts/ContactLoader.java
+++ b/src/com/android/contacts/ContactLoader.java
@@ -30,6 +30,7 @@
import android.content.Context;
import android.content.Entity;
import android.content.Entity.NamedContentValues;
+import android.content.Intent;
import android.content.Loader;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -784,7 +785,7 @@
HashMap<String, AccountType> result = new HashMap<String, AccountType>(allInvitables);
- // Remove the ones that already has a raw contact in the current contact
+ // Remove the ones that already have a raw contact in the current contact
for (Entity entity : contactData.getEntities()) {
final String type = entity.getEntityValues().getAsString(RawContacts.ACCOUNT_TYPE);
if (!TextUtils.isEmpty(type)) {
@@ -1095,12 +1096,45 @@
mContact.setLoadingPhoto(true);
new AsyncPhotoLoader().execute(mContact.getPhotoUri());
}
+
+ // inform the source of the data that this contact is being looked at
+ postViewNotificationToSyncAdapter();
}
deliverResult(mContact);
}
}
+ /**
+ * Posts a message to the contributing sync adapters that have opted-in, notifying them
+ * that the contact has just been loaded
+ */
+ private void postViewNotificationToSyncAdapter() {
+ Context context = getContext();
+ for (Entity entity : mContact.getEntities()) {
+ final ContentValues entityValues = entity.getEntityValues();
+ final String type = entityValues.getAsString(RawContacts.ACCOUNT_TYPE);
+ final String dataSet = entityValues.getAsString(RawContacts.DATA_SET);
+ final AccountType accountType = AccountTypeManager.getInstance(context ).getAccountType(
+ type, dataSet);
+ final String serviceName = accountType.getViewContactNotifyServiceClassName();
+ final String resPackageName = accountType.resPackageName;
+ if (!TextUtils.isEmpty(serviceName) && !TextUtils.isEmpty(resPackageName)) {
+ final long rawContactId = entityValues.getAsLong(RawContacts.Entity._ID);
+ final Uri uri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+ final Intent intent = new Intent();
+ intent.setClassName(resPackageName, serviceName);
+ intent.setAction(Intent.ACTION_VIEW);
+ intent.setDataAndType(uri, RawContacts.CONTENT_ITEM_TYPE);
+ try {
+ context.startService(intent);
+ } catch (Exception e) {
+ Log.e(TAG, "Error sending message to source-app", e);
+ }
+ }
+ }
+ }
+
private class AsyncPhotoLoader extends AsyncTask<String, Void, byte[]> {
private static final int BUFFER_SIZE = 1024*16;
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index 54ea05f..2936110 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -171,11 +171,6 @@
}
@Override
- public void setTitleTo(int resourceId) {
- setTitle(resourceId);
- }
-
- @Override
public void onEditOtherContactRequested(
Uri contactLookupUri, ArrayList<ContentValues> values) {
Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
diff --git a/src/com/android/contacts/activities/GroupEditorActivity.java b/src/com/android/contacts/activities/GroupEditorActivity.java
index f0d2aa1..b397c19 100644
--- a/src/com/android/contacts/activities/GroupEditorActivity.java
+++ b/src/com/android/contacts/activities/GroupEditorActivity.java
@@ -71,7 +71,7 @@
saveMenuItem.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- mFragment.doSaveAction();
+ mFragment.onDoneClicked();
}
});
// Show the custom action bar but hide the home icon and title
@@ -85,8 +85,13 @@
R.id.group_editor_fragment);
mFragment.setListener(mFragmentListener);
mFragment.setContentResolver(getContentResolver());
- Uri uri = Intent.ACTION_EDIT.equals(action) ? getIntent().getData() : null;
- mFragment.load(action, uri, getIntent().getExtras());
+
+ // NOTE The fragment will restore its state by itself after orientation changes, so
+ // we need to do this only for a new instance.
+ if (savedState == null) {
+ Uri uri = Intent.ACTION_EDIT.equals(action) ? getIntent().getData() : null;
+ mFragment.load(action, uri, getIntent().getExtras());
+ }
}
@Override
@@ -158,11 +163,6 @@
}
finish();
}
-
- @Override
- public void onTitleLoaded(int resourceId) {
- setTitle(resourceId);
- }
};
@Override
diff --git a/src/com/android/contacts/detail/ContactDetailDisplayUtils.java b/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
index 94150b3..eeafdda 100644
--- a/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
+++ b/src/com/android/contacts/detail/ContactDetailDisplayUtils.java
@@ -67,9 +67,8 @@
}
/**
- * Returns the display name of the contact. Depending on the preference for
- * display name ordering, the contact's first name may be bolded if
- * possible. Returns empty string if there is no display name.
+ * Returns the display name of the contact, using the current display order setting.
+ * Returns res/string/missing_name if there is no display name.
*/
public static CharSequence getDisplayName(Context context, Result contactData) {
CharSequence displayName = contactData.getDisplayName();
@@ -78,25 +77,9 @@
CharSequence styledName = "";
if (!TextUtils.isEmpty(displayName) && !TextUtils.isEmpty(altDisplayName)) {
if (prefs.getDisplayOrder() == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
- int overlapPoint = FormatUtils.overlapPoint(
- displayName.toString(), altDisplayName.toString());
- if (overlapPoint > 0) {
- styledName = FormatUtils.applyStyleToSpan(Typeface.BOLD,
- displayName, 0, overlapPoint, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- } else {
- styledName = displayName;
- }
+ styledName = displayName;
} else {
- // Displaying alternate display name.
- int overlapPoint = FormatUtils.overlapPoint(
- altDisplayName.toString(), displayName.toString());
- if (overlapPoint > 0) {
- styledName = FormatUtils.applyStyleToSpan(Typeface.BOLD,
- altDisplayName, overlapPoint, altDisplayName.length(),
- Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- } else {
- styledName = altDisplayName;
- }
+ styledName = altDisplayName;
}
} else {
styledName = context.getResources().getString(R.string.missing_name);
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 383f23b..47617d3 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -118,7 +118,7 @@
import java.util.Map;
public class ContactDetailFragment extends Fragment implements FragmentKeyListener, ViewOverlay,
- SelectAccountDialogFragment.Listener {
+ SelectAccountDialogFragment.Listener, OnItemClickListener {
private static final String TAG = "ContactDetailFragment";
@@ -279,6 +279,7 @@
mListView = (ListView) mView.findViewById(android.R.id.list);
mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
+ mListView.setOnItemClickListener(this);
mListView.setItemsCanFocus(true);
mListView.setOnScrollListener(mVerticalScrollListener);
@@ -1709,6 +1710,21 @@
}
}
+ /**
+ * Default (fallback) list item click listener. Note the click event for DetailViewEntry is
+ * caught by individual views in the list item view to distinguish the primary action and the
+ * secondary action, so this method won't be invoked for that. (The listener is set in the
+ * bindview in the adapter)
+ * This listener is used for other kind of entries.
+ */
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+ if (mListener == null) return;
+ final ViewEntry entry = mAdapter.getItem(position);
+ if (entry == null) return;
+ entry.click(view, mListener);
+ }
+
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
diff --git a/src/com/android/contacts/detail/ContactLoaderFragment.java b/src/com/android/contacts/detail/ContactLoaderFragment.java
index 8d3cd75..265550b 100644
--- a/src/com/android/contacts/detail/ContactLoaderFragment.java
+++ b/src/com/android/contacts/detail/ContactLoaderFragment.java
@@ -19,7 +19,6 @@
import com.android.contacts.ContactLoader;
import com.android.contacts.ContactSaveService;
import com.android.contacts.R;
-import com.android.contacts.activities.ContactDetailActivity;
import com.android.contacts.activities.ContactDetailActivity.FragmentKeyListener;
import com.android.contacts.util.PhoneCapabilityTester;
import com.android.internal.util.Objects;
@@ -29,7 +28,6 @@
import android.app.LoaderManager;
import android.app.LoaderManager.LoaderCallbacks;
import android.content.ActivityNotFoundException;
-import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 4126425..412efab 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -317,11 +317,8 @@
if (!hasIncomingState) {
if (Intent.ACTION_EDIT.equals(mAction)) {
- if (mListener != null) mListener.setTitleTo(R.string.editContact_title_edit);
getLoaderManager().initLoader(LOADER_DATA, null, mDataLoaderListener);
} else if (Intent.ACTION_INSERT.equals(mAction)) {
- if (mListener != null) mListener.setTitleTo(R.string.editContact_title_insert);
-
final Account account = mIntentExtras == null ? null :
(Account) mIntentExtras.getParcelable(Intents.Insert.ACCOUNT);
final String dataSet = mIntentExtras == null ? null :
@@ -1119,11 +1116,6 @@
void onReverted();
/**
- * Set the Title (e.g. of the Activity)
- */
- void setTitleTo(int resourceId);
-
- /**
* Contact was saved and the Fragment can now be closed safely.
*/
void onSaveFinished(Intent resultIntent);
diff --git a/src/com/android/contacts/editor/ExternalRawContactEditorView.java b/src/com/android/contacts/editor/ExternalRawContactEditorView.java
index 04f4140..cabf639 100644
--- a/src/com/android/contacts/editor/ExternalRawContactEditorView.java
+++ b/src/com/android/contacts/editor/ExternalRawContactEditorView.java
@@ -138,6 +138,8 @@
mContext.getString(R.string.from_account_format, mAccountName));
}
mAccountTypeTextView.setText(mContext.getString(R.string.account_type_format, accountType));
+ mAccountTypeTextView.setTextColor(mContext.getResources().getColor(
+ R.color.secondary_text_color));
// TODO: Expose data set in the UI somehow?
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index bb25ea0..6452c80 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -508,7 +508,7 @@
if (convertView == null) {
textView = (TextView) mInflater.inflate(resource, parent, false);
textView.setAllCaps(true);
- textView.setGravity(Gravity.RIGHT);
+ textView.setGravity(Gravity.RIGHT | Gravity.CENTER_VERTICAL);
textView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
textView.setTextColor(mTextColor);
} else {
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index 6335cb6..dd3c15a 100644
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -129,12 +129,11 @@
mInflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- final int photoSize = getResources().getDimensionPixelSize(R.dimen.edit_photo_size);
-
mName = (StructuredNameEditorView)findViewById(R.id.edit_name);
mName.setDeletable(false);
mPhoneticName = (PhoneticNameEditorView)findViewById(R.id.edit_phonetic_name);
+ mPhoneticName.setDeletable(false);
mFields = (ViewGroup)findViewById(R.id.sect_fields);
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index d3fa3b7..a448f4e 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -60,7 +60,7 @@
private ImageView mExpansionView;
private boolean mHideOptional = true;
private boolean mHasShortAndLongForms;
- private int mHintTextColor;
+ private int mMinFieldHeight;
public TextFieldsEditorView(Context context) {
super(context);
@@ -82,7 +82,8 @@
setDrawingCacheEnabled(true);
setAlwaysDrawnWithCacheEnabled(true);
- mHintTextColor = getContext().getResources().getColor(R.color.secondary_text_color);
+ mMinFieldHeight = mContext.getResources().getDimensionPixelSize(
+ R.dimen.editor_min_line_item_height);
mFields = (ViewGroup) findViewById(R.id.editors);
mExpansionView = (ImageView) findViewById(R.id.expansion_view);
mExpansionViewContainer = findViewById(R.id.expansion_view_container);
@@ -173,9 +174,8 @@
final EditField field = kind.fieldList.get(index);
final EditText fieldView = new EditText(mContext);
fieldView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
- LayoutParams.WRAP_CONTENT));
+ field.isMultiLine() ? LayoutParams.WRAP_CONTENT : mMinFieldHeight));
fieldView.setTextAppearance(getContext(), kind.textAppearanceResourceId);
- fieldView.setHintTextColor(mHintTextColor);
fieldView.setGravity(Gravity.TOP);
mFieldEditTexts[index] = fieldView;
fieldView.setId(vig.getId(state, kind, entry, index));
@@ -184,9 +184,6 @@
}
int inputType = field.inputType;
fieldView.setInputType(inputType);
- if (field.isFullName) {
- fieldView.addTextChangedListener(new NameFormattingTextWatcher());
- }
if (inputType == InputType.TYPE_CLASS_PHONE) {
fieldView.addTextChangedListener(new PhoneNumberFormattingTextWatcher(
ContactsUtils.getCurrentCountryIso(mContext)));
@@ -353,62 +350,6 @@
};
}
- private class NameFormattingTextWatcher implements TextWatcher {
-
-
- @Override
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
- @Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
- @Override
- public void afterTextChanged(Editable s) {
- String displayName = s.toString();
- Map<String, String> structuredName = NameConverter.displayNameToStructuredName(
- getContext(), displayName);
- String givenName = structuredName.get(StructuredName.GIVEN_NAME);
- if (!TextUtils.isEmpty(givenName)) {
- int spanStart = -1;
- int spanEnd = -1;
- if (displayName.startsWith(givenName + " ")) {
- spanStart = 0;
- spanEnd = givenName.length();
- } else {
- spanStart = displayName.lastIndexOf(" " + givenName);
- if (spanStart > -1) {
- spanStart++;
- spanEnd = spanStart + givenName.length();
- }
- }
-
- // If the requested range is already bolded, don't make any changes.
- if (spanStart > -1) {
- StyleSpan[] existingSpans = s.getSpans(0, s.length(), StyleSpan.class);
- for (StyleSpan span : existingSpans) {
- if (span.getStyle() == Typeface.BOLD
- && s.getSpanStart(span.getUnderlying()) == spanStart
- && s.getSpanEnd(span.getUnderlying()) == spanEnd) {
- // Nothing to do - the correct portion is already bolded.
- return;
- }
- }
-
- // Clear any existing bold style spans.
- for (StyleSpan span : existingSpans) {
- if (span.getStyle() == Typeface.BOLD) {
- s.removeSpan(span);
- }
- }
-
- // Set the new bold span.
- s.setSpan(new StyleSpan(Typeface.BOLD), spanStart, spanEnd,
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
- }
- }
- }
-
@Override
public void clearAllFields() {
if (mFieldEditTexts != null) {
diff --git a/src/com/android/contacts/format/DisplayNameFormatter.java b/src/com/android/contacts/format/DisplayNameFormatter.java
index 07577f2..e525217 100644
--- a/src/com/android/contacts/format/DisplayNameFormatter.java
+++ b/src/com/android/contacts/format/DisplayNameFormatter.java
@@ -65,15 +65,6 @@
public CharSequence getDisplayName(int displayOrder, boolean highlightingEnabled,
char[] highlightedPrefix) {
- // Compute the point at which name and alternate name overlap (for bolding).
- int overlapPoint = FormatUtils.overlapPoint(mNameBuffer, mAlternateNameBuffer);
- int boldStart = 0;
- int boldEnd = overlapPoint;
- if (displayOrder == ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE) {
- boldStart = overlapPoint;
- boldEnd = mNameBuffer.sizeCopied;
- }
-
int size = mNameBuffer.sizeCopied;
if (size == 0) {
return mUnknownNameText;
@@ -93,11 +84,6 @@
if (highlightedPrefix != null) {
text = mPrefixHighlighter.apply(text, highlightedPrefix);
}
- if (overlapPoint > 0) {
- // Bold the first or last name.
- text = FormatUtils.applyStyleToSpan(Typeface.BOLD, text, boldStart, boldEnd,
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
return text;
}
}
diff --git a/src/com/android/contacts/group/GroupEditorFragment.java b/src/com/android/contacts/group/GroupEditorFragment.java
index ccc84a2..b060541 100644
--- a/src/com/android/contacts/group/GroupEditorFragment.java
+++ b/src/com/android/contacts/group/GroupEditorFragment.java
@@ -48,6 +48,8 @@
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents;
import android.text.TextUtils;
@@ -63,7 +65,6 @@
import android.widget.AdapterView.OnItemClickListener;
import android.widget.AutoCompleteTextView;
import android.widget.BaseAdapter;
-import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.QuickContactBadge;
@@ -73,13 +74,24 @@
import java.util.ArrayList;
import java.util.List;
-// TODO: Use savedInstanceState
public class GroupEditorFragment extends Fragment implements SelectAccountDialogFragment.Listener {
-
private static final String TAG = "GroupEditorFragment";
private static final String LEGACY_CONTACTS_AUTHORITY = "contacts";
+ private static final String KEY_ACTION = "action";
+ private static final String KEY_GROUP_URI = "groupUri";
+ private static final String KEY_GROUP_ID = "groupId";
+ private static final String KEY_STATUS = "status";
+ private static final String KEY_ACCOUNT_NAME = "accountName";
+ private static final String KEY_ACCOUNT_TYPE = "accountType";
+ private static final String KEY_DATA_SET = "dataSet";
+ private static final String KEY_GROUP_NAME_IS_READ_ONLY = "groupNameIsReadOnly";
+ private static final String KEY_ORIGINAL_GROUP_NAME = "originalGroupName";
+ private static final String KEY_MEMBERS_TO_ADD = "membersToAdd";
+ private static final String KEY_MEMBERS_TO_REMOVE = "membersToRemove";
+ private static final String KEY_MEMBERS_TO_DISPLAY = "membersToDisplay";
+
public static interface Listener {
/**
* Group metadata was not found, close the fragment now.
@@ -92,11 +104,6 @@
void onReverted();
/**
- * Title has been determined.
- */
- void onTitleLoaded(int resourceId);
-
- /**
* Contact was saved and the Fragment can now be closed safely.
*/
void onSaveFinished(int resultCode, Intent resultIntent);
@@ -145,7 +152,8 @@
* Modes that specify the status of the editor
*/
public enum Status {
- LOADING, // Loader is fetching the data
+ SELECTING_ACCOUNT, // Account select dialog is showing
+ LOADING, // Loader is fetching the group metadata
EDITING, // Not currently busy. We are waiting forthe user to enter data.
SAVING, // Data is currently being saved
CLOSING // Prevents any more saves
@@ -170,10 +178,11 @@
private TextView mAccountNameTextView;
private AutoCompleteTextView mAutoCompleteTextView;
- private boolean mGroupNameIsReadOnly;
private String mAccountName;
private String mAccountType;
private String mDataSet;
+
+ private boolean mGroupNameIsReadOnly;
private String mOriginalGroupName = "";
private MemberListAdapter mMemberListAdapter;
@@ -182,9 +191,9 @@
private ContentResolver mContentResolver;
private SuggestedMemberListAdapter mAutoCompleteAdapter;
- private List<Member> mListMembersToAdd = new ArrayList<Member>();
- private List<Member> mListMembersToRemove = new ArrayList<Member>();
- private List<Member> mListToDisplay = new ArrayList<Member>();
+ private final List<Member> mListMembersToAdd = new ArrayList<Member>();
+ private final List<Member> mListMembersToRemove = new ArrayList<Member>();
+ private final List<Member> mListToDisplay = new ArrayList<Member>();
public GroupEditorFragment() {
}
@@ -209,18 +218,19 @@
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
- // Edit an existing group
- if (Intent.ACTION_EDIT.equals(mAction)) {
- if (mListener != null) {
- mListener.onTitleLoaded(R.string.editGroup_title_edit);
+ if (savedInstanceState != null) {
+ // Just restore from the saved state. No loading.
+ onRestoreInstanceState(savedInstanceState);
+ if (mStatus == Status.SELECTING_ACCOUNT) {
+ // Account select dialog is showing. Don't setup the editor yet.
+ } else if (mStatus == Status.LOADING) {
+ startGroupMetaDataLoader();
+ } else {
+ setupEditorForAccount();
}
- getLoaderManager().initLoader(LOADER_GROUP_METADATA, null,
- mGroupMetaDataLoaderListener);
+ } else if (Intent.ACTION_EDIT.equals(mAction)) {
+ startGroupMetaDataLoader();
} else if (Intent.ACTION_INSERT.equals(mAction)) {
- if (mListener != null) {
- mListener.onTitleLoaded(R.string.editGroup_title_insert);
- }
-
final Account account = mIntentExtras == null ? null :
(Account) mIntentExtras.getParcelable(Intents.Insert.ACCOUNT);
final String dataSet = mIntentExtras == null ? null :
@@ -242,6 +252,51 @@
}
}
+ private void startGroupMetaDataLoader() {
+ mStatus = Status.LOADING;
+ getLoaderManager().initLoader(LOADER_GROUP_METADATA, null,
+ mGroupMetaDataLoaderListener);
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putString(KEY_ACTION, mAction);
+ outState.putParcelable(KEY_GROUP_URI, mGroupUri);
+ outState.putLong(KEY_GROUP_ID, mGroupId);
+
+ outState.putSerializable(KEY_STATUS, mStatus);
+ outState.putString(KEY_ACCOUNT_NAME, mAccountName);
+ outState.putString(KEY_ACCOUNT_TYPE, mAccountType);
+ outState.putString(KEY_DATA_SET, mDataSet);
+
+ outState.putBoolean(KEY_GROUP_NAME_IS_READ_ONLY, mGroupNameIsReadOnly);
+ outState.putString(KEY_ORIGINAL_GROUP_NAME, mOriginalGroupName);
+
+ outState.putParcelableArray(KEY_MEMBERS_TO_ADD, Member.toArray(mListMembersToAdd));
+ outState.putParcelableArray(KEY_MEMBERS_TO_REMOVE, Member.toArray(mListMembersToRemove));
+ outState.putParcelableArray(KEY_MEMBERS_TO_DISPLAY, Member.toArray(mListToDisplay));
+ }
+
+ private void onRestoreInstanceState(Bundle state) {
+ mAction = state.getString(KEY_ACTION);
+ mGroupUri = state.getParcelable(KEY_GROUP_URI);
+ mGroupId = state.getLong(KEY_GROUP_ID);
+
+ mStatus = (Status) state.getSerializable(KEY_STATUS);
+ mAccountName = state.getString(KEY_ACCOUNT_NAME);
+ mAccountType = state.getString(KEY_ACCOUNT_TYPE);
+ mDataSet = state.getString(KEY_DATA_SET);
+
+ mGroupNameIsReadOnly = state.getBoolean(KEY_GROUP_NAME_IS_READ_ONLY);
+ mOriginalGroupName = state.getString(KEY_ORIGINAL_GROUP_NAME);
+
+ Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_ADD), mListMembersToAdd);
+ Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_REMOVE),
+ mListMembersToRemove);
+ Member.toList((Member[]) state.getParcelableArray(KEY_MEMBERS_TO_DISPLAY), mListToDisplay);
+ }
+
public void setContentResolver(ContentResolver resolver) {
mContentResolver = resolver;
if (mAutoCompleteAdapter != null) {
@@ -267,6 +322,7 @@
return; // Don't show a dialog.
}
+ mStatus = Status.SELECTING_ACCOUNT;
final SelectAccountDialogFragment dialog = new SelectAccountDialogFragment(
R.string.dialog_new_group_account);
dialog.setTargetFragment(this, 0);
@@ -289,13 +345,27 @@
}
}
+ private AccountType getAccountType() {
+ return AccountTypeManager.getInstance(mContext).getAccountType(mAccountType, mDataSet);
+ }
+
+ /**
+ * @return true if the group membership is editable on this account type. false otherwise,
+ * or account is not set yet.
+ */
+ private boolean isGroupMembershipEditable() {
+ if (mAccountType == null) {
+ return false;
+ }
+ return getAccountType().isGroupMembershipEditable();
+ }
+
/**
* Sets up the editor based on the group's account name and type.
*/
private void setupEditorForAccount() {
- final AccountTypeManager accountTypeManager = AccountTypeManager.getInstance(mContext);
- final AccountType accountType = accountTypeManager.getAccountType(mAccountType, mDataSet);
- final boolean editable = accountType.isGroupMembershipEditable();
+ final AccountType accountType = getAccountType();
+ final boolean editable = isGroupMembershipEditable();
mMemberListAdapter.setIsGroupMembershipEditable(editable);
View editorView = mLayoutInflater.inflate(editable ?
@@ -345,8 +415,14 @@
mAutoCompleteTextView.setText("");
}
});
+ // Update the exempt list. (mListToDisplay might have been restored from the saved
+ // state.)
+ mAutoCompleteAdapter.updateExistingMembersList(mListToDisplay);
}
+ // If the group name is ready only, don't let the user focus on the field.
+ mGroupNameView.setFocusable(!mGroupNameIsReadOnly);
+
mRootView.addView(editorView);
mStatus = Status.EDITING;
}
@@ -359,30 +435,21 @@
}
private void bindGroupMetaData(Cursor cursor) {
- if (cursor.getCount() == 0) {
- if (mListener != null) {
- mListener.onGroupNotFound();
- }
- }
- try {
- cursor.moveToFirst();
- mOriginalGroupName = cursor.getString(GroupMetaDataLoader.TITLE);
- mAccountName = cursor.getString(GroupMetaDataLoader.ACCOUNT_NAME);
- mAccountType = cursor.getString(GroupMetaDataLoader.ACCOUNT_TYPE);
- mGroupNameIsReadOnly = (cursor.getInt(GroupMetaDataLoader.IS_READ_ONLY) == 1);
- } catch (Exception e) {
+ if (!cursor.moveToFirst()) {
Log.i(TAG, "Group not found with URI: " + mGroupUri + " Closing activity now.");
if (mListener != null) {
mListener.onGroupNotFound();
}
- } finally {
- cursor.close();
+ return;
}
+ mOriginalGroupName = cursor.getString(GroupMetaDataLoader.TITLE);
+ mAccountName = cursor.getString(GroupMetaDataLoader.ACCOUNT_NAME);
+ mAccountType = cursor.getString(GroupMetaDataLoader.ACCOUNT_TYPE);
+ mGroupNameIsReadOnly = (cursor.getInt(GroupMetaDataLoader.IS_READ_ONLY) == 1);
setupEditorForAccount();
- // Setup the group metadata display (If the group name is ready only, don't let the user
- // focus on the field).
+
+ // Setup the group metadata display
mGroupNameView.setText(mOriginalGroupName);
- mGroupNameView.setFocusable(!mGroupNameIsReadOnly);
}
public void loadMemberToAddToGroup(long rawContactId, String contactId) {
@@ -396,8 +463,13 @@
mListener = value;
}
- public void doSaveAction() {
- save(SaveMode.CLOSE);
+ public void onDoneClicked() {
+ if (isGroupMembershipEditable()) {
+ save(SaveMode.CLOSE);
+ } else {
+ // Just revert it.
+ doRevertAction();
+ }
}
@Override
@@ -596,13 +668,13 @@
return membersArray;
}
- private void addExistingMembers(List<Member> members, List<Long> listContactIds) {
+ private void addExistingMembers(List<Member> members) {
mListToDisplay.addAll(members);
mMemberListAdapter.notifyDataSetChanged();
// Update the autocomplete adapter (if there is one) so these contacts don't get suggested
if (mAutoCompleteAdapter != null) {
- mAutoCompleteAdapter.updateExistingMembersList(listContactIds);
+ mAutoCompleteAdapter.updateExistingMembersList(members);
}
}
@@ -672,29 +744,23 @@
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
- List<Long> listContactIds = new ArrayList<Long>();
List<Member> listExistingMembers = new ArrayList<Member>();
- try {
- data.moveToPosition(-1);
- while (data.moveToNext()) {
- long contactId = data.getLong(GroupMemberLoader.CONTACT_ID_COLUMN_INDEX);
- long rawContactId = data.getLong(GroupMemberLoader.RAW_CONTACT_ID_COLUMN_INDEX);
- String lookupKey = data.getString(
- GroupMemberLoader.CONTACT_LOOKUP_KEY_COLUMN_INDEX);
- String displayName = data.getString(
- GroupMemberLoader.CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX);
- String photoUri = data.getString(
- GroupMemberLoader.CONTACT_PHOTO_URI_COLUMN_INDEX);
- listExistingMembers.add(new Member(rawContactId, lookupKey, contactId,
- displayName, photoUri));
- listContactIds.add(contactId);
- }
- } finally {
- data.close();
+ data.moveToPosition(-1);
+ while (data.moveToNext()) {
+ long contactId = data.getLong(GroupMemberLoader.CONTACT_ID_COLUMN_INDEX);
+ long rawContactId = data.getLong(GroupMemberLoader.RAW_CONTACT_ID_COLUMN_INDEX);
+ String lookupKey = data.getString(
+ GroupMemberLoader.CONTACT_LOOKUP_KEY_COLUMN_INDEX);
+ String displayName = data.getString(
+ GroupMemberLoader.CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX);
+ String photoUri = data.getString(
+ GroupMemberLoader.CONTACT_PHOTO_URI_COLUMN_INDEX);
+ listExistingMembers.add(new Member(rawContactId, lookupKey, contactId,
+ displayName, photoUri));
}
// Update the display list
- addExistingMembers(listExistingMembers, listContactIds);
+ addExistingMembers(listExistingMembers);
// No more updates
// TODO: move to a runnable
@@ -725,26 +791,17 @@
@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
- // Retrieve the contact data fields that will be sufficient to update the adapter with
- // a new entry for this contact
- Member member = null;
- try {
- cursor.moveToFirst();
- long contactId = cursor.getLong(CONTACT_ID_COLUMN_INDEX);
- String displayName = cursor.getString(CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX);
- String lookupKey = cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX);
- String photoUri = cursor.getString(CONTACT_PHOTO_URI_COLUMN_INDEX);
- getLoaderManager().destroyLoader(LOADER_NEW_GROUP_MEMBER);
- member = new Member(mRawContactId, lookupKey, contactId, displayName, photoUri);
- } finally {
- cursor.close();
- }
-
- if (member == null) {
+ if (!cursor.moveToFirst()) {
return;
}
-
- // Otherwise continue adding the member to list of members
+ // Retrieve the contact data fields that will be sufficient to update the adapter with
+ // a new entry for this contact
+ long contactId = cursor.getLong(CONTACT_ID_COLUMN_INDEX);
+ String displayName = cursor.getString(CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX);
+ String lookupKey = cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX);
+ String photoUri = cursor.getString(CONTACT_PHOTO_URI_COLUMN_INDEX);
+ getLoaderManager().destroyLoader(LOADER_NEW_GROUP_MEMBER);
+ Member member = new Member(mRawContactId, lookupKey, contactId, displayName, photoUri);
addMember(member);
}
@@ -755,7 +812,9 @@
/**
* This represents a single member of the current group.
*/
- public static class Member {
+ public static class Member implements Parcelable {
+ private static final Member[] EMPTY_ARRAY = new Member[0];
+
// TODO: Switch to just dealing with raw contact IDs everywhere if possible
private final long mRawContactId;
private final long mContactId;
@@ -800,6 +859,55 @@
}
return false;
}
+
+ // Parcelable
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeLong(mRawContactId);
+ dest.writeLong(mContactId);
+ dest.writeParcelable(mLookupUri, flags);
+ dest.writeString(mDisplayName);
+ dest.writeParcelable(mPhotoUri, flags);
+ }
+
+ private Member(Parcel in) {
+ mRawContactId = in.readLong();
+ mContactId = in.readLong();
+ mLookupUri = in.readParcelable(getClass().getClassLoader());
+ mDisplayName = in.readString();
+ mPhotoUri = in.readParcelable(getClass().getClassLoader());
+ }
+
+ public static final Parcelable.Creator<Member> CREATOR = new Parcelable.Creator<Member>() {
+ public Member createFromParcel(Parcel in) {
+ return new Member(in);
+ }
+
+ public Member[] newArray(int size) {
+ return new Member[size];
+ }
+ };
+
+ /** Convert to an array */
+ public static Member[] toArray(List<Member> list) {
+ return list.toArray(EMPTY_ARRAY);
+ }
+
+ /**
+ * Convert to a list. Instead of creating a new one, this method clears the passed list
+ * and adds elements to it.
+ */
+ public static void toList(Member[] array, List<Member> list) {
+ list.clear();
+ for (Member member : array) {
+ list.add(member);
+ }
+ }
}
/**
diff --git a/src/com/android/contacts/group/SuggestedMemberListAdapter.java b/src/com/android/contacts/group/SuggestedMemberListAdapter.java
index 653cc25..f671b65 100644
--- a/src/com/android/contacts/group/SuggestedMemberListAdapter.java
+++ b/src/com/android/contacts/group/SuggestedMemberListAdapter.java
@@ -82,7 +82,7 @@
// TODO: Make this a Map for better performance when we check if a new contact is in the list
// or not
- private List<Long> mExistingMemberContactIds = new ArrayList<Long>();
+ private final List<Long> mExistingMemberContactIds = new ArrayList<Long>();
private static final int SUGGESTIONS_LIMIT = 5;
@@ -107,8 +107,11 @@
mContentResolver = resolver;
}
- public void updateExistingMembersList(List<Long> listContactIds) {
- mExistingMemberContactIds = listContactIds;
+ public void updateExistingMembersList(List<GroupEditorFragment.Member> list) {
+ mExistingMemberContactIds.clear();
+ for (GroupEditorFragment.Member member : list) {
+ mExistingMemberContactIds.add(member.getContactId());
+ }
}
public void addNewMember(long contactId) {
diff --git a/src/com/android/contacts/list/ContactTileAdapter.java b/src/com/android/contacts/list/ContactTileAdapter.java
index 0d4eb8c..cc0a184 100644
--- a/src/com/android/contacts/list/ContactTileAdapter.java
+++ b/src/com/android/contacts/list/ContactTileAdapter.java
@@ -341,6 +341,7 @@
@Override
public View getView(int position, View convertView, ViewGroup parent) {
int itemViewType = getItemViewType(position);
+
if (itemViewType == ViewTypes.DIVIDER) {
// Checking For Divider First so not to cast convertView
return convertView == null ? getDivider() : convertView;
@@ -353,7 +354,7 @@
// Creating new row if needed
contactTileRowView = new ContactTileRow(mContext, itemViewType);
}
- contactTileRowView.configureRow(contactList);
+ contactTileRowView.configureRow(contactList, position == getCount() - 1);
return contactTileRowView;
}
@@ -455,21 +456,21 @@
/**
* Configures the row to add {@link ContactEntry}s information to the views
*/
- public void configureRow(ArrayList<ContactEntry> list) {
+ public void configureRow(ArrayList<ContactEntry> list, boolean isLastRow) {
int columnCount = mItemViewType == ViewTypes.FREQUENT ? 1 : mColumnCount;
// Adding tiles to row and filling in contact information
for (int columnCounter = 0; columnCounter < columnCount; columnCounter++) {
ContactEntry entry =
columnCounter < list.size() ? list.get(columnCounter) : null;
- addTileFromEntry(entry, columnCounter);
+ addTileFromEntry(entry, columnCounter, isLastRow);
}
}
- private void addTileFromEntry(ContactEntry entry, int tileIndex) {
+ private void addTileFromEntry(ContactEntry entry, int childIndex, boolean isLastRow) {
final ContactTileView contactTile;
- if (getChildCount() <= tileIndex) {
+ if (getChildCount() <= childIndex) {
contactTile = (ContactTileView) inflate(mContext, mLayoutResId, null);
contactTile.setLayoutParams(new LinearLayout.LayoutParams(0,
LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f));
@@ -477,10 +478,15 @@
contactTile.setListener(mContactTileListener);
addView(contactTile);
} else {
- contactTile = (ContactTileView) getChildAt(tileIndex);
+ contactTile = (ContactTileView) getChildAt(childIndex);
}
contactTile.setClickable(entry != null);
contactTile.loadFromContact(entry);
+
+ contactTile.setVerticalDividerVisibility(
+ childIndex >= mColumnCount - 1 ? View.GONE : View.VISIBLE);
+ contactTile.setHorizontalDividerVisibility(
+ isLastRow ? View.GONE : View.VISIBLE);
}
}
diff --git a/src/com/android/contacts/list/ContactTileView.java b/src/com/android/contacts/list/ContactTileView.java
index 4dfa876..ef9c2fb 100644
--- a/src/com/android/contacts/list/ContactTileView.java
+++ b/src/com/android/contacts/list/ContactTileView.java
@@ -49,6 +49,8 @@
private ContactPhotoManager mPhotoManager = null;
private ImageButton mPushState;
private Listener mListener;
+ private View mVerticalDivider;
+ private View mHorizontalDivider;
public ContactTileView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -66,6 +68,8 @@
mPhoneLabel = (TextView) findViewById(R.id.contact_tile_phone_type);
mPhoneNumber = (TextView) findViewById(R.id.contact_tile_phone_number);
mPushState = (ImageButton) findViewById(R.id.contact_tile_push_state);
+ mVerticalDivider = findViewById(R.id.contact_tile_vertical_divider);
+ mHorizontalDivider = findViewById(R.id.contact_tile_horizontal_divider);
OnClickListener listener = new OnClickListener() {
@Override
@@ -148,6 +152,14 @@
}
}
+ public void setVerticalDividerVisibility(int visibility) {
+ if (mVerticalDivider != null) mVerticalDivider.setVisibility(visibility);
+ }
+
+ public void setHorizontalDividerVisibility(int visibility) {
+ if (mHorizontalDivider != null) mHorizontalDivider.setVisibility(visibility);
+ }
+
public void setListener(Listener listener) {
mListener = listener;
}
diff --git a/src/com/android/contacts/model/AccountType.java b/src/com/android/contacts/model/AccountType.java
index 59b9f45..a78185f 100644
--- a/src/com/android/contacts/model/AccountType.java
+++ b/src/com/android/contacts/model/AccountType.java
@@ -31,6 +31,7 @@
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.RawContacts;
+import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import java.text.Collator;
@@ -112,6 +113,16 @@
return null;
}
+ /**
+ * Returns an optional service that can be launched whenever a contact is being looked at.
+ * This allows the sync adapter to provide more up-to-date information.
+ * The service class should reside in the sync adapter package as determined by
+ * {@link #resPackageName}.
+ */
+ public String getViewContactNotifyServiceClassName() {
+ return null;
+ }
+
public CharSequence getDisplayLabel(Context context) {
return getResourceText(context, summaryResPackageName, titleRes, accountType);
}
@@ -357,6 +368,10 @@
this.isFullName = isFullName;
return this;
}
+
+ public boolean isMultiLine() {
+ return (inputType & EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) != 0;
+ }
}
/**
diff --git a/src/com/android/contacts/model/ExternalAccountType.java b/src/com/android/contacts/model/ExternalAccountType.java
index e5af8f8..5dd4d3b 100644
--- a/src/com/android/contacts/model/ExternalAccountType.java
+++ b/src/com/android/contacts/model/ExternalAccountType.java
@@ -57,6 +57,7 @@
private static final String ATTR_CREATE_CONTACT_ACTIVITY = "createContactActivity";
private static final String ATTR_INVITE_CONTACT_ACTIVITY = "inviteContactActivity";
private static final String ATTR_INVITE_CONTACT_ACTION_LABEL = "inviteContactActionLabel";
+ private static final String ATTR_VIEW_CONTACT_NOTIFY_SERVICE = "viewContactNotifyService";
private static final String ATTR_DATA_SET = "dataSet";
private static final String ATTR_EXTENSION_PACKAGE_NAMES = "extensionPackageNames";
@@ -71,6 +72,7 @@
private String mCreateContactActivityClassName;
private String mInviteContactActivity;
private String mInviteActionLabelAttribute;
+ private String mViewContactNotifyService;
private List<String> mExtensionPackageNames;
private int mInviteActionLabelResId;
private String mAccountTypeLabelAttribute;
@@ -149,6 +151,11 @@
}
@Override
+ public String getViewContactNotifyServiceClassName() {
+ return mViewContactNotifyService;
+ }
+
+ @Override
public List<String> getExtensionPackageNames() {
return mExtensionPackageNames;
}
@@ -193,6 +200,8 @@
mInviteContactActivity = value;
} else if (ATTR_INVITE_CONTACT_ACTION_LABEL.equals(attr)) {
mInviteActionLabelAttribute = value;
+ } else if (ATTR_VIEW_CONTACT_NOTIFY_SERVICE.equals(attr)) {
+ mViewContactNotifyService = value;
} else if (ATTR_DATA_SET.equals(attr)) {
dataSet = value;
} else if (ATTR_EXTENSION_PACKAGE_NAMES.equals(attr)) {