Merge "Update assets"
diff --git a/res/layout-sw580dp/event_field_editor_view.xml b/res/layout-sw580dp/event_field_editor_view.xml
index c9eef08..f31b283 100644
--- a/res/layout-sw580dp/event_field_editor_view.xml
+++ b/res/layout-sw580dp/event_field_editor_view.xml
@@ -23,10 +23,6 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical">
- <include
- android:id="@+id/title"
- layout="@layout/edit_field_title" />
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout-sw580dp/item_kind_section.xml b/res/layout-sw580dp/item_kind_section.xml
index dd38e26..31538bb 100644
--- a/res/layout-sw580dp/item_kind_section.xml
+++ b/res/layout-sw580dp/item_kind_section.xml
@@ -22,11 +22,9 @@
android:layout_height="wrap_content"
android:paddingBottom="@dimen/editor_field_bottom_padding"
android:orientation="vertical">
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:src="@drawable/divider_horizontal_light" />
+
+ <include
+ layout="@layout/edit_kind_title" />
<LinearLayout
android:id="@+id/kind_editors"
diff --git a/res/layout-sw580dp/text_fields_editor_view.xml b/res/layout-sw580dp/text_fields_editor_view.xml
index 8be354b..be0ea67 100644
--- a/res/layout-sw580dp/text_fields_editor_view.xml
+++ b/res/layout-sw580dp/text_fields_editor_view.xml
@@ -21,10 +21,6 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical">
- <include
- android:id="@+id/title"
- layout="@layout/edit_field_title" />
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index a116cb3..2ea8425 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -21,10 +21,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin"
- android:paddingTop="@dimen/detail_item_vertical_margin"
- android:paddingBottom="@dimen/detail_item_vertical_margin"
android:orientation="horizontal"
android:gravity="center_vertical">
diff --git a/res/layout/contact_detail_network_title_entry_view.xml b/res/layout/contact_detail_network_title_entry_view.xml
new file mode 100644
index 0000000..2cede93
--- /dev/null
+++ b/res/layout/contact_detail_network_title_entry_view.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/detail_item_side_margin"
+ android:paddingRight="@dimen/detail_item_side_margin"
+ android:paddingTop="@dimen/detail_item_vertical_margin"
+ android:paddingBottom="@dimen/detail_item_vertical_margin"
+ android:orientation="horizontal"
+ android:gravity="center_vertical">
+
+ <ImageView
+ android:id="@+id/network_icon"
+ android:layout_width="@dimen/detail_network_icon_size"
+ android:layout_height="@dimen/detail_network_icon_size"
+ android:layout_gravity="center_vertical"
+ android:scaleType="centerInside" />
+
+ <TextView
+ android:id="@+id/network_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/detail_item_side_margin"
+ android:layout_gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
+</LinearLayout>
diff --git a/res/layout/contact_detail_separator_entry_view.xml b/res/layout/contact_detail_separator_entry_view.xml
index abdca5f..abe1cf8 100644
--- a/res/layout/contact_detail_separator_entry_view.xml
+++ b/res/layout/contact_detail_separator_entry_view.xml
@@ -16,9 +16,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin">
+ android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
diff --git a/res/layout/edit_add_field.xml b/res/layout/edit_add_field.xml
index 1c8c740..f6bc631 100644
--- a/res/layout/edit_add_field.xml
+++ b/res/layout/edit_add_field.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
<!-- Layout of "add field" row in contact editor -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="13dip"
@@ -23,17 +22,9 @@
<TextView
android:id="@+id/add_text"
android:layout_gravity="center_vertical"
- android:layout_width="0dip"
- android:layout_weight="1"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ android:duplicateParentState="true"
+ android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorTertiary" />
- <ImageView
- android:id="@+id/add_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_menu_add_field_holo_light"
- android:paddingLeft="@dimen/editor_round_button_padding_left"
- android:paddingRight="@dimen/editor_round_button_padding_right"
- android:contentDescription="@string/description_plus_button" />
-</LinearLayout>
\ No newline at end of file
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/edit_field_list.xml b/res/layout/edit_field_list.xml
index f9e6565..ba715c7 100644
--- a/res/layout/edit_field_list.xml
+++ b/res/layout/edit_field_list.xml
@@ -23,5 +23,4 @@
android:layout_weight="1"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/editor_field_left_padding"
- android:paddingRight="@dimen/editor_field_right_padding"
android:orientation="vertical" />
\ No newline at end of file
diff --git a/res/layout/edit_field_title.xml b/res/layout/edit_field_title.xml
deleted file mode 100644
index 4918c4d..0000000
--- a/res/layout/edit_field_title.xml
+++ /dev/null
@@ -1,29 +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.
--->
-
-<!-- Title of a field in the contact editor. -->
-
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="@dimen/editor_field_top_padding"
- android:paddingLeft="@dimen/editor_field_left_padding"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:fadingEdge="horizontal" />
\ No newline at end of file
diff --git a/res/layout/edit_kind_title.xml b/res/layout/edit_kind_title.xml
new file mode 100644
index 0000000..619ba49
--- /dev/null
+++ b/res/layout/edit_kind_title.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/editor_field_left_padding"
+ android:paddingRight="@dimen/editor_field_right_padding"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/kind_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/editor_field_left_padding"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/people_app_theme_color"
+ android:textStyle="bold"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:paddingTop="5dip"
+ android:paddingBottom="2dip" />
+
+ <ImageView
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="2dip"
+ android:scaleType="fitXY"
+ android:src="@color/people_app_theme_color"/>
+
+</LinearLayout>
diff --git a/res/layout/edit_spinner.xml b/res/layout/edit_spinner.xml
index 9e22ee7..325eb50 100644
--- a/res/layout/edit_spinner.xml
+++ b/res/layout/edit_spinner.xml
@@ -16,11 +16,12 @@
<!-- Spinner for a field in the contact editor. -->
+<!-- Note: explicitly override the default left and right padding on spinner -->
<Spinner
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/spinner"
- android:layout_width="wrap_content"
+ android:layout_width="@dimen/editor_type_label_width"
android:layout_height="wrap_content"
- android:layout_marginLeft="@dimen/editor_field_left_padding"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:paddingLeft="5dip"/>
\ No newline at end of file
+ android:paddingLeft="5dip"
+ android:paddingRight="20dip"
+ android:textAppearance="?android:attr/textAppearanceSmall"/>
\ No newline at end of file
diff --git a/res/layout/event_field_editor_view.xml b/res/layout/event_field_editor_view.xml
index 6625279..0dceafc 100644
--- a/res/layout/event_field_editor_view.xml
+++ b/res/layout/event_field_editor_view.xml
@@ -22,15 +22,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <include
- android:id="@+id/title"
- layout="@layout/edit_field_title" />
-
- <include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:visibility="gone" />
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -45,6 +36,11 @@
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" />
diff --git a/res/layout/item_group_membership.xml b/res/layout/item_group_membership.xml
index 13ddb20..62d06ea 100644
--- a/res/layout/item_group_membership.xml
+++ b/res/layout/item_group_membership.xml
@@ -20,15 +20,8 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:src="@drawable/divider_horizontal_light" />
-
<include
- android:id="@+id/kind_title"
- layout="@layout/edit_field_title" />
+ layout="@layout/edit_kind_title" />
<Button
style="?android:attr/spinnerStyle"
@@ -41,7 +34,6 @@
android:gravity="left|center_vertical"
android:ellipsize="end"
android:focusable="true"
- android:paddingLeft="@dimen/editor_field_left_padding"
- />
+ android:paddingLeft="@dimen/editor_field_left_padding" />
</com.android.contacts.editor.GroupMembershipView>
diff --git a/res/layout/item_kind_section.xml b/res/layout/item_kind_section.xml
index 2c6dc6f..edc9d37 100644
--- a/res/layout/item_kind_section.xml
+++ b/res/layout/item_kind_section.xml
@@ -23,11 +23,8 @@
android:paddingBottom="@dimen/editor_field_bottom_padding"
android:orientation="vertical">
- <ImageView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:scaleType="fitXY"
- android:src="@drawable/divider_horizontal_light" />
+ <include
+ layout="@layout/edit_kind_title" />
<LinearLayout
android:id="@+id/kind_editors"
diff --git a/res/layout/raw_contact_editor_view.xml b/res/layout/raw_contact_editor_view.xml
index 2f62fe0..79183cd 100644
--- a/res/layout/raw_contact_editor_view.xml
+++ b/res/layout/raw_contact_editor_view.xml
@@ -44,8 +44,7 @@
android:id="@+id/account_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="20sp"
- android:textColor="?android:attr/textColorPrimary"
+ android:textAppearance="?android:attr/textAppearanceMedium"
android:singleLine="true" />
<TextView
@@ -53,17 +52,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorPrimary"
+ android:textColor="?android:attr/textColorTertiary"
android:singleLine="true" />
</LinearLayout>
- <ImageView
- android:id="@+id/account_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="7dip"
- android:layout_marginRight="7dip" />
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent">
+
+ <ImageView
+ android:id="@+id/account_icon"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:layout_marginLeft="24dip"
+ android:layout_marginRight="24dip"
+ android:layout_gravity="center_vertical" />
+
+ </FrameLayout>
</LinearLayout>
@@ -86,7 +92,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="16dip">
<include
android:id="@+id/edit_photo"
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index d33e804..c8d35a4 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -20,15 +20,6 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <include
- android:id="@+id/title"
- layout="@layout/edit_field_title" />
-
- <include
- android:id="@+id/spinner"
- layout="@layout/edit_spinner"
- android:visibility="gone" />
-
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -43,6 +34,11 @@
layout="@layout/edit_field_list" />
<include
+ android:id="@+id/spinner"
+ layout="@layout/edit_spinner"
+ android:visibility="gone" />
+
+ <include
android:id="@+id/expansion_view_container"
layout="@layout/edit_expansion_view"
android:visibility="gone" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 0d868e9..c3b1fee 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
<resources>
- <dimen name="edit_photo_size">90dip</dimen>
+ <dimen name="edit_photo_size">42dip</dimen>
<!-- The height of the ScrollingTabWidget -->
<dimen name="tab_height">40dip</dimen>
@@ -45,7 +45,7 @@
<dimen name="editor_round_button_padding_bottom">8dip</dimen>
<!-- Width of the Type-Label in the Editor -->
- <dimen name="editor_type_label_width">120dip</dimen>
+ <dimen name="editor_type_label_width">100dip</dimen>
<!-- Left padding of a field in the Editor -->
<dimen name="editor_field_left_padding">5dip</dimen>
@@ -125,6 +125,9 @@
<!-- Width of a contact detail item type (i.e. Nickname or Website). -->
<dimen name="detail_item_type_width">164dip</dimen>
+ <!-- Width of height of an icon from a third-party app in the networks section of the contact card. -->
+ <dimen name="detail_network_icon_size">32dip</dimen>
+
<!-- Font size for the display name in header of the contact detail page -->
<dimen name="detail_header_name_text_size">30sp</dimen>
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index 6d031e9..579c833 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -180,6 +180,14 @@
*/
private boolean mFragmentInitialized;
+ /**
+ * Whether or not the activity is destroyed. This flag is needed to ensure that the
+ * {@link Handler} does not execute any {@link FragmentTransaction}s in {@link Runnable}s
+ * after the activity is destroyed.
+ * TODO: Figure out a way to get rid of the {@link Handler} or make the operation safe.
+ */
+ private boolean mIsActivityDestroyed = false;
+
/** Sequential ID assigned to each instance; used for logging */
private final int mInstanceId;
private static final AtomicInteger sNextInstanceId = new AtomicInteger();
@@ -463,6 +471,7 @@
@Override
protected void onDestroy() {
+ mIsActivityDestroyed = true;
// mActionBarAdapter will be null here when redirecting to another activity in
// configureContentView().
if (mActionBarAdapter != null) {
@@ -1005,6 +1014,10 @@
mHandler.post(new Runnable() {
@Override
public void run() {
+ // Don't continue setting up the detail page if the activity is destroyed.
+ if (mIsActivityDestroyed) {
+ return;
+ }
if (!mContactDetailLayoutController.isInitialized()) {
mContactDetailLayoutController.setContactDetailFragment(
mContactDetailFragment);
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 1921063..9709480 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -106,7 +106,9 @@
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
public class ContactDetailFragment extends Fragment implements FragmentKeyListener, FragmentOverlay,
OnItemClickListener, OnItemLongClickListener, SelectAccountDialogFragment.Listener {
@@ -131,6 +133,7 @@
private ListView mListView;
private ViewAdapter mAdapter;
private Uri mPrimaryPhoneUri = null;
+ private ViewEntryDimensions mViewEntryDimensions;
private Button mQuickFixButton;
private QuickFix mQuickFix;
@@ -193,7 +196,8 @@
private ArrayList<DetailViewEntry> mWebsiteEntries = new ArrayList<DetailViewEntry>();
private ArrayList<DetailViewEntry> mSipEntries = new ArrayList<DetailViewEntry>();
private ArrayList<DetailViewEntry> mEventEntries = new ArrayList<DetailViewEntry>();
- private ArrayList<DetailViewEntry> mOtherEntries = new ArrayList<DetailViewEntry>();
+ private final Map<AccountType, List<DetailViewEntry>> mOtherEntriesMap =
+ new HashMap<AccountType, List<DetailViewEntry>>();
private ArrayList<ViewEntry> mAllEntries = new ArrayList<ViewEntry>();
private LayoutInflater mInflater;
@@ -235,6 +239,7 @@
super.onAttach(activity);
mContext = activity;
mDefaultCountryIso = ContactsUtils.getCurrentCountryIso(mContext);
+ mViewEntryDimensions = new ViewEntryDimensions(mContext.getResources());
}
@Override
@@ -643,7 +648,17 @@
}
if (hasSocial || hasData) {
- mOtherEntries.add(entry);
+ // If the account type exists in the hash map, add it as another entry for
+ // that account type
+ if (mOtherEntriesMap.containsKey(type)) {
+ List<DetailViewEntry> listEntries = mOtherEntriesMap.get(type);
+ listEntries.add(entry);
+ } else {
+ // Otherwise create a new list with the entry and add it to the hash map
+ List<DetailViewEntry> listEntries = new ArrayList<DetailViewEntry>();
+ listEntries.add(entry);
+ mOtherEntriesMap.put(type, listEntries);
+ }
}
}
}
@@ -724,8 +739,8 @@
private void addNetworks() {
String attribution = ContactDetailDisplayUtils.getAttribution(mContext, mContactData);
boolean hasAttribution = !TextUtils.isEmpty(attribution);
- int otherEntriesSize = mOtherEntries.size();
- if (!hasAttribution && otherEntriesSize == 0) {
+ int networksCount = mOtherEntriesMap.keySet().size();
+ if (!hasAttribution && networksCount == 0) {
return;
}
@@ -739,19 +754,32 @@
entry.kind = networkKindTitle;
entry.data = attribution;
mAllEntries.add(entry);
+
+ // Add a divider below the attribution if there are network details that will follow
+ if (networksCount > 0) {
+ mAllEntries.add(new SeparatorViewEntry());
+ }
}
// Add the other entries from third parties
- for (int i = 0; i < otherEntriesSize; i++) {
- // Add a divider above the entry. Don't add an entry above the first one if it's the
- // first one in the DataKind.
- if (i != 0 || (i == 0 && hasAttribution)) {
- mAllEntries.add(new SeparatorViewEntry());
+ for (AccountType accountType : mOtherEntriesMap.keySet()) {
+
+ // Add a title for each third party app
+ mAllEntries.add(new NetworkTitleViewEntry(accountType));
+
+ for (DetailViewEntry detailEntry : mOtherEntriesMap.get(accountType)) {
+ // Add indented separator
+ SeparatorViewEntry separatorEntry = new SeparatorViewEntry();
+ separatorEntry.setIsInSubSection(true);
+ mAllEntries.add(separatorEntry);
+
+ // Add indented detail
+ detailEntry.setIsInSubSection(true);
+ mAllEntries.add(detailEntry);
}
- mAllEntries.add(mOtherEntries.get(i));
}
- mOtherEntries.clear();
+ mOtherEntriesMap.clear();
}
/**
@@ -930,10 +958,23 @@
*/
private static class SeparatorViewEntry extends ViewEntry {
+ /**
+ * Whether or not the entry is in a subsection (if true then the contents will be indented
+ * to the right)
+ */
+ private boolean mIsInSubSection = false;
+
SeparatorViewEntry() {
super(ViewAdapter.VIEW_TYPE_SEPARATOR_ENTRY);
}
+ public void setIsInSubSection(boolean isInSubSection) {
+ mIsInSubSection = isInSubSection;
+ }
+
+ public boolean isInSubSection() {
+ return mIsInSubSection;
+ }
}
/**
@@ -942,13 +983,33 @@
*/
private static class KindTitleViewEntry extends ViewEntry {
- public final String title;
+ private final String mTitle;
KindTitleViewEntry(String titleText) {
super(ViewAdapter.VIEW_TYPE_KIND_TITLE_ENTRY);
- title = titleText;
+ mTitle = titleText;
}
+ public String getTitle() {
+ return mTitle;
+ }
+ }
+
+ /**
+ * A title for a section of contact details from a single 3rd party network.
+ */
+ private static class NetworkTitleViewEntry extends ViewEntry {
+
+ private final AccountType mAccountType;
+
+ NetworkTitleViewEntry(AccountType type) {
+ super(ViewAdapter.VIEW_TYPE_NETWORK_TITLE_ENTRY);
+ mAccountType = type;
+ }
+
+ public AccountType getAccountType() {
+ return mAccountType;
+ }
}
/**
@@ -956,6 +1017,7 @@
* list of data.
*/
static class DetailViewEntry extends ViewEntry implements Collapsible<DetailViewEntry> {
+ // TODO: Make getters/setters for these fields
public int type = -1;
public String kind;
public String typeString;
@@ -979,6 +1041,8 @@
public CharSequence footerLine = null;
+ private boolean mIsInSubSection = false;
+
DetailViewEntry() {
super(ViewAdapter.VIEW_TYPE_DETAIL_ENTRY);
isEnabled = true;
@@ -1050,6 +1114,14 @@
return this;
}
+ public void setIsInSubSection(boolean isInSubSection) {
+ mIsInSubSection = isInSubSection;
+ }
+
+ public boolean isInSubSection() {
+ return mIsInSubSection;
+ }
+
@Override
public boolean collapseWith(DetailViewEntry entry) {
// assert equal collapse keys
@@ -1107,8 +1179,24 @@
}
}
- /** Cache of the children views of a row */
- private static class ViewCache {
+ /**
+ * Cache of the children views for a view that displays a {@link NetworkTitleViewEntry}
+ */
+ private static class NetworkTitleViewCache {
+ public final TextView name;
+ public final ImageView icon;
+
+ public NetworkTitleViewCache(View view) {
+ name = (TextView) view.findViewById(R.id.network_title);
+ icon = (ImageView) view.findViewById(R.id.network_icon);
+ }
+ }
+
+ /**
+ * Cache of the children views of a contact detail entry represented by a
+ * {@link DetailViewEntry}
+ */
+ private static class DetailViewCache {
public TextView kind;
public TextView type;
public TextView data;
@@ -1117,6 +1205,21 @@
public ImageView secondaryActionButton;
public View secondaryActionButtonContainer;
public View secondaryActionDivider;
+
+ public DetailViewCache(View view, OnClickListener secondaryActionClickListener) {
+ kind = (TextView) view.findViewById(R.id.kind);
+ type = (TextView) view.findViewById(R.id.type);
+ data = (TextView) view.findViewById(R.id.data);
+ footer = (TextView) view.findViewById(R.id.footer);
+ presenceIcon = (ImageView) view.findViewById(R.id.presence_icon);
+ secondaryActionButton = (ImageView) view.findViewById(
+ R.id.secondary_action_button);
+ secondaryActionButtonContainer = view.findViewById(
+ R.id.secondary_action_button_container);
+ secondaryActionButtonContainer.setOnClickListener(
+ secondaryActionClickListener);
+ secondaryActionDivider = view.findViewById(R.id.vertical_divider);
+ }
}
private final class ViewAdapter extends BaseAdapter {
@@ -1124,8 +1227,9 @@
public static final int VIEW_TYPE_DETAIL_ENTRY = 0;
public static final int VIEW_TYPE_HEADER_ENTRY = 1;
public static final int VIEW_TYPE_KIND_TITLE_ENTRY = 2;
- public static final int VIEW_TYPE_SEPARATOR_ENTRY = 3;
- private static final int VIEW_TYPE_COUNT = 4;
+ public static final int VIEW_TYPE_NETWORK_TITLE_ENTRY = 3;
+ public static final int VIEW_TYPE_SEPARATOR_ENTRY = 4;
+ private static final int VIEW_TYPE_COUNT = 5;
@Override
public View getView(int position, View convertView, ViewGroup parent) {
@@ -1133,11 +1237,13 @@
case VIEW_TYPE_HEADER_ENTRY:
return getHeaderEntryView(convertView, parent);
case VIEW_TYPE_SEPARATOR_ENTRY:
- return getSeparatorEntryView(convertView, parent);
+ return getSeparatorEntryView(position, convertView, parent);
case VIEW_TYPE_KIND_TITLE_ENTRY:
return getKindTitleEntryView(position, convertView, parent);
case VIEW_TYPE_DETAIL_ENTRY:
return getDetailEntryView(position, convertView, parent);
+ case VIEW_TYPE_NETWORK_TITLE_ENTRY:
+ return getNetworkTitleEntryView(position, convertView, parent);
default:
throw new IllegalStateException("Invalid view type ID " +
getItemViewType(position));
@@ -1199,11 +1305,16 @@
return mHeaderView;
}
- private View getSeparatorEntryView(View convertView, ViewGroup parent) {
- if (convertView != null) {
- return convertView;
- }
- return mInflater.inflate(R.layout.contact_detail_separator_entry_view, parent, false);
+ private View getSeparatorEntryView(int position, View convertView, ViewGroup parent) {
+ final SeparatorViewEntry entry = (SeparatorViewEntry) getItem(position);
+ final View result = (convertView != null) ? convertView :
+ mInflater.inflate(R.layout.contact_detail_separator_entry_view, parent, false);
+
+ result.setPadding(entry.isInSubSection() ? mViewEntryDimensions.getWidePaddingLeft() :
+ mViewEntryDimensions.getPaddingLeft(), 0,
+ mViewEntryDimensions.getPaddingRight(), 0);
+
+ return result;
}
private View getKindTitleEntryView(int position, View convertView, ViewGroup parent) {
@@ -1212,7 +1323,28 @@
final View result = (convertView != null) ? convertView :
mInflater.inflate(R.layout.contact_detail_kind_title_entry_view, parent, false);
final TextView titleTextView = (TextView) result.findViewById(R.id.kind);
- titleTextView.setText(entry.title);
+ titleTextView.setText(entry.getTitle());
+
+ return result;
+ }
+
+ private View getNetworkTitleEntryView(int position, View convertView, ViewGroup parent) {
+ final NetworkTitleViewEntry entry = (NetworkTitleViewEntry) getItem(position);
+ final View result;
+ final NetworkTitleViewCache viewCache;
+
+ if (convertView != null) {
+ result = convertView;
+ viewCache = (NetworkTitleViewCache) result.getTag();
+ } else {
+ result = mInflater.inflate(R.layout.contact_detail_network_title_entry_view,
+ parent, false);
+ viewCache = new NetworkTitleViewCache(result);
+ result.setTag(viewCache);
+ }
+
+ viewCache.name.setText(entry.getAccountType().getDisplayLabel(mContext));
+ viewCache.icon.setImageDrawable(entry.getAccountType().getDisplayIcon(mContext));
return result;
}
@@ -1220,40 +1352,28 @@
private View getDetailEntryView(int position, View convertView, ViewGroup parent) {
final DetailViewEntry entry = (DetailViewEntry) getItem(position);
final View v;
- final ViewCache viewCache;
+ final DetailViewCache viewCache;
// Check to see if we can reuse convertView
if (convertView != null) {
v = convertView;
- viewCache = (ViewCache) v.getTag();
+ viewCache = (DetailViewCache) v.getTag();
} else {
// Create a new view if needed
v = mInflater.inflate(R.layout.contact_detail_list_item, parent, false);
// Cache the children
- viewCache = new ViewCache();
- viewCache.kind = (TextView) v.findViewById(R.id.kind);
- viewCache.type = (TextView) v.findViewById(R.id.type);
- viewCache.data = (TextView) v.findViewById(R.id.data);
- viewCache.footer = (TextView) v.findViewById(R.id.footer);
- viewCache.presenceIcon = (ImageView) v.findViewById(R.id.presence_icon);
- viewCache.secondaryActionButton = (ImageView) v.findViewById(
- R.id.secondary_action_button);
- viewCache.secondaryActionButtonContainer = v.findViewById(
- R.id.secondary_action_button_container);
- viewCache.secondaryActionButtonContainer.setOnClickListener(
- mSecondaryActionClickListener);
- viewCache.secondaryActionDivider = v.findViewById(R.id.vertical_divider);
+ viewCache = new DetailViewCache(v, mSecondaryActionClickListener);
v.setTag(viewCache);
}
- bindView(v, entry);
+ bindDetailView(v, entry);
return v;
}
- private void bindView(View view, DetailViewEntry entry) {
+ private void bindDetailView(View view, DetailViewEntry entry) {
final Resources resources = mContext.getResources();
- ViewCache views = (ViewCache) view.getTag();
+ DetailViewCache views = (DetailViewCache) view.getTag();
if (!TextUtils.isEmpty(entry.typeString)) {
views.type.setText(entry.typeString.toUpperCase());
@@ -1306,6 +1426,12 @@
views.secondaryActionButtonContainer.setVisibility(View.GONE);
views.secondaryActionDivider.setVisibility(View.GONE);
}
+
+ view.setPadding(entry.isInSubSection() ? mViewEntryDimensions.getWidePaddingLeft() :
+ mViewEntryDimensions.getPaddingLeft(),
+ mViewEntryDimensions.getPaddingTop(),
+ mViewEntryDimensions.getPaddingRight(),
+ mViewEntryDimensions.getPaddingBottom());
}
private void setMaxLines(TextView textView, int maxLines) {
@@ -1402,7 +1528,7 @@
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
if (mListener == null) return false;
- final ViewCache cache = (ViewCache) view.getTag();
+ final DetailViewCache cache = (DetailViewCache) view.getTag();
if (cache == null) return false;
CharSequence text = cache.data.getText();
if (TextUtils.isEmpty(text)) return false;
@@ -1599,6 +1725,51 @@
}
}
+ /**
+ * This class loads the correct padding values for a contact detail item so they can be applied
+ * dynamically. For example, this supports the case where some detail items can be indented and
+ * need extra padding.
+ */
+ private static class ViewEntryDimensions {
+
+ private final int mWidePaddingLeft;
+ private final int mPaddingLeft;
+ private final int mPaddingRight;
+ private final int mPaddingTop;
+ private final int mPaddingBottom;
+
+ public ViewEntryDimensions(Resources resources) {
+ mPaddingLeft = resources.getDimensionPixelSize(
+ R.dimen.detail_item_side_margin);
+ mPaddingTop = resources.getDimensionPixelSize(
+ R.dimen.detail_item_vertical_margin);
+ mWidePaddingLeft = 2 * mPaddingLeft +
+ resources.getDimensionPixelSize(R.dimen.detail_network_icon_size);
+ mPaddingRight = mPaddingLeft;
+ mPaddingBottom = mPaddingTop;
+ }
+
+ public int getWidePaddingLeft() {
+ return mWidePaddingLeft;
+ }
+
+ public int getPaddingLeft() {
+ return mPaddingLeft;
+ }
+
+ public int getPaddingRight() {
+ return mPaddingRight;
+ }
+
+ public int getPaddingTop() {
+ return mPaddingTop;
+ }
+
+ public int getPaddingBottom() {
+ return mPaddingBottom;
+ }
+ }
+
public static interface Listener {
/**
* User clicked a single item (e.g. mail)
diff --git a/src/com/android/contacts/detail/ContactDetailLayoutController.java b/src/com/android/contacts/detail/ContactDetailLayoutController.java
index 826d720..dda3884 100644
--- a/src/com/android/contacts/detail/ContactDetailLayoutController.java
+++ b/src/com/android/contacts/detail/ContactDetailLayoutController.java
@@ -161,7 +161,12 @@
throw new IllegalStateException("Invalid LayoutMode " + mLayoutMode);
}
- ft.commit();
+ // If the activity has already saved its state, then allow this fragment
+ // transaction to be dropped because there's nothing else we can do to update the UI.
+ // The fact that the contact URI has already been saved by the activity means we can
+ // restore this later.
+ // TODO: Figure out if this is really the solution we want.
+ ft.commitAllowingStateLoss();
}
private void showContactWithoutUpdates() {
@@ -182,7 +187,12 @@
throw new IllegalStateException("Invalid LayoutMode " + mLayoutMode);
}
- ft.commit();
+ // If the activity has already saved its state, then allow this fragment
+ // transaction to be dropped because there's nothing else we can do to update the UI.
+ // The fact that the contact URI has already been saved by the activity means we can
+ // restore this later.
+ // TODO: Figure out if this is really the solution we want.
+ ft.commitAllowingStateLoss();
}
public void onSaveInstanceState(Bundle outState) {
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 6afe8b9..85d21f3 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -571,8 +571,8 @@
final LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
final AccountTypeManager accountTypes = AccountTypeManager.getInstance(mContext);
- int size = mState.size();
- for (int i = 0; i < size; i++) {
+ int numRawContacts = mState.size();
+ for (int i = 0; i < numRawContacts; i++) {
// TODO ensure proper ordering of entities in the list
final EntityDelta entity = mState.get(i);
final ValuesDelta values = entity.getValues();
@@ -588,10 +588,16 @@
R.layout.external_raw_contact_editor_view, mContent, false);
((ExternalRawContactEditorView) editor).setListener(this);
} else {
- editor = (BaseRawContactEditorView)
+ final RawContactEditorView rawContactEditor = (RawContactEditorView)
inflater.inflate(R.layout.raw_contact_editor_view, mContent, false);
+ // For existing contacts, only show the account header if there is more than 1 raw
+ // contact in the aggregate contact.
+ if (Intent.ACTION_EDIT.equals(mAction)) {
+ rawContactEditor.setAccountHeaderVisible(numRawContacts > 1);
+ }
+ editor = rawContactEditor;
}
- if (Intent.ACTION_INSERT.equals(mAction) && size == 1) {
+ if (Intent.ACTION_INSERT.equals(mAction) && numRawContacts == 1) {
final ArrayList<Account> accounts =
AccountTypeManager.getInstance(mContext).getAccounts(true);
if (accounts.size() > 1) {
@@ -600,6 +606,7 @@
disableAccountSwitcher(editor);
}
}
+
editor.setEnabled(mEnabled);
mContent.addView(editor);
@@ -708,6 +715,7 @@
// on an existing contact
final View accountView = editor.findViewById(R.id.account);
accountView.setBackgroundDrawable(null);
+ accountView.setEnabled(false);
}
@Override
diff --git a/src/com/android/contacts/editor/KindSectionView.java b/src/com/android/contacts/editor/KindSectionView.java
index 8ca7a05..bd2a9a6 100644
--- a/src/com/android/contacts/editor/KindSectionView.java
+++ b/src/com/android/contacts/editor/KindSectionView.java
@@ -43,6 +43,7 @@
public class KindSectionView extends LinearLayout implements EditorListener {
private static final String TAG = "KindSectionView";
+ private TextView mTitle;
private ViewGroup mEditors;
private View mAddFieldFooter;
private TextView mAddFieldText;
@@ -93,7 +94,8 @@
mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- mEditors = (ViewGroup)findViewById(R.id.kind_editors);
+ mTitle = (TextView) findViewById(R.id.kind_title);
+ mEditors = (ViewGroup) findViewById(R.id.kind_editors);
mAddFieldText = (TextView) findViewById(R.id.add_text);
mAddFieldFooter = findViewById(R.id.add_field_footer);
mAddFieldFooter.setOnClickListener(new OnClickListener() {
@@ -135,6 +137,7 @@
mTitleString = (kind.titleRes == -1 || kind.titleRes == 0)
? ""
: getResources().getString(kind.titleRes);
+ mTitle.setText(mTitleString.toUpperCase());
// Set "add field" footer message according to MIME type. Some MIME types
// can only have max 1 field, so the resource ID will be -1 if these sections
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index ddecf5a..91819a2 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -31,10 +31,12 @@
import android.content.Context;
import android.content.DialogInterface;
import android.content.Entity;
+import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -62,7 +64,6 @@
private static final int INPUT_TYPE_CUSTOM = EditorInfo.TYPE_CLASS_TEXT
| EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
- private TextView mTitle;
private Spinner mLabel;
private EditTypeAdapter mEditTypeAdapter;
private View mDeleteContainer;
@@ -124,8 +125,6 @@
@Override
protected void onFinishInflate() {
- mTitle = (TextView) findViewById(R.id.title);
-
mLabel = (Spinner) findViewById(R.id.spinner);
mLabel.setOnItemSelectedListener(mSpinnerListener);
@@ -165,26 +164,19 @@
}
/**
- * Creates or removes the type/label button. Doesn't do anything if already correctly configured
+ * Configures the visibility of the type label button and enables or disables it properly.
*/
private void setupLabelButton(boolean shouldExist) {
- if (mTitle == null) {
- return;
- }
if (shouldExist) {
mLabel.setEnabled(!mReadOnly && isEnabled());
mLabel.setVisibility(View.VISIBLE);
-
- // Since there's a spinner for this editor, use this as the title
- // instead of the title TextView.
- mTitle.setVisibility(View.GONE);
} else {
mLabel.setVisibility(View.GONE);
}
}
/**
- * Creates or removes the remove button. Doesn't do anything if already correctly configured
+ * Configures the visibility of the "delete" button and enables or disables it properly.
*/
private void setupDeleteButton() {
if (mIsDeletable) {
@@ -197,7 +189,7 @@
public void setDeleteButtonVisible(boolean visible) {
if (mIsDeletable) {
- mDeleteContainer.setVisibility(visible ? View.VISIBLE : View.GONE);
+ mDeleteContainer.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}
}
@@ -275,7 +267,7 @@
if (mWasEmpty != isEmpty) {
if (isEmpty) {
mListener.onRequest(EditorListener.FIELD_TURNED_EMPTY);
- if (mIsDeletable) mDeleteContainer.setVisibility(View.GONE);
+ if (mIsDeletable) mDeleteContainer.setVisibility(View.INVISIBLE);
} else {
mListener.onRequest(EditorListener.FIELD_TURNED_NON_EMPTY);
if (mIsDeletable) mDeleteContainer.setVisibility(View.VISIBLE);
@@ -318,18 +310,6 @@
}
setVisibility(View.VISIBLE);
- // TODO: handle resources from remote packages
- String titleString = (kind.titleRes == -1 || kind.titleRes == 0)
- ? ""
- : getResources().getString(kind.titleRes);
-
- // If there is a title field, then setup the title (although it may not be shown if there is
- // a Spinner setup later). There are cases where a title may not be present (i.e. structured
- // name).
- if (mTitle != null) {
- mTitle.setText(titleString.toUpperCase());
- }
-
// Display label selector if multiple types available
final boolean hasTypes = EntityModifier.hasEditTypes(kind);
setupLabelButton(hasTypes);
@@ -513,6 +493,8 @@
text = getContext().getString(type.labelRes);
}
textView.setText(text.toUpperCase());
+ textView.setGravity(Gravity.RIGHT);
+ textView.setTextColor(Color.GRAY);
return view;
}
}
diff --git a/src/com/android/contacts/editor/RawContactEditorView.java b/src/com/android/contacts/editor/RawContactEditorView.java
index b0230fc..881f590 100644
--- a/src/com/android/contacts/editor/RawContactEditorView.java
+++ b/src/com/android/contacts/editor/RawContactEditorView.java
@@ -139,7 +139,7 @@
mFields = (ViewGroup)findViewById(R.id.sect_fields);
- mAccountContainer = findViewById(R.id.account);
+ mAccountContainer = findViewById(R.id.anchor_for_account_switcher);
mAccountIcon = (ImageView) findViewById(R.id.account_icon);
mAccountTypeTextView = (TextView) findViewById(R.id.account_type);
mAccountNameTextView = (TextView) findViewById(R.id.account_name);
@@ -153,6 +153,10 @@
});
}
+ public void setAccountHeaderVisible(boolean visible) {
+ mAccountContainer.setVisibility(visible ? View.VISIBLE : View.GONE);
+ }
+
/**
* Set the internal state for this view, given a current
* {@link EntityDelta} state and the {@link AccountType} that
@@ -176,9 +180,6 @@
ValuesDelta values = state.getValues();
mRawContactId = values.getAsLong(RawContacts._ID);
- final ArrayList<Account> accounts =
- AccountTypeManager.getInstance(mContext).getAccounts(true);
-
// Fill in the account info
String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
CharSequence accountType = type.getDisplayLabel(mContext);
diff --git a/src/com/android/contacts/model/BaseAccountType.java b/src/com/android/contacts/model/BaseAccountType.java
index 5c3e245..c2e8a53 100644
--- a/src/com/android/contacts/model/BaseAccountType.java
+++ b/src/com/android/contacts/model/BaseAccountType.java
@@ -100,7 +100,7 @@
protected DataKind addDataKindStructuredName(Context context) {
DataKind kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE,
R.string.nameLabelsGroup, -1, -1, true, R.layout.structured_name_editor_view,
- android.R.style.TextAppearance_Large, -1));
+ android.R.style.TextAppearance_Medium, -1));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
@@ -130,7 +130,7 @@
protected DataKind addDataKindDisplayName(Context context) {
DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_DISPLAY_NAME,
R.string.nameLabelsGroup, -1, -1, true, R.layout.text_fields_editor_view,
- android.R.style.TextAppearance_Large, -1));
+ android.R.style.TextAppearance_Medium, -1));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
@@ -208,7 +208,7 @@
protected DataKind addDataKindPhone(Context context) {
DataKind kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup,
android.R.drawable.sym_action_call, 10, true,
- R.layout.text_fields_editor_view, android.R.style.TextAppearance_Large,
+ R.layout.text_fields_editor_view, android.R.style.TextAppearance_Medium,
R.string.add_phone));
kind.iconAltRes = R.drawable.sym_action_sms;
kind.actionHeader = new PhoneActionInflater();
@@ -286,7 +286,7 @@
kind.fieldList = Lists.newArrayList();
kind.fieldList.add(
new EditField(StructuredPostal.FORMATTED_ADDRESS, R.string.postal_address,
- FLAGS_POSTAL).setMinLines(3));
+ FLAGS_POSTAL).setMinLines(1));
return kind;
}
diff --git a/src/com/android/contacts/model/ExchangeAccountType.java b/src/com/android/contacts/model/ExchangeAccountType.java
index 8db4a7b..5b007aa 100644
--- a/src/com/android/contacts/model/ExchangeAccountType.java
+++ b/src/com/android/contacts/model/ExchangeAccountType.java
@@ -65,7 +65,7 @@
protected DataKind addDataKindStructuredName(Context context) {
DataKind kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE,
R.string.nameLabelsGroup, -1, -1, true,
- R.layout.structured_name_editor_view, android.R.style.TextAppearance_Large, -1));
+ R.layout.structured_name_editor_view, android.R.style.TextAppearance_Medium, -1));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
@@ -95,7 +95,7 @@
protected DataKind addDataKindDisplayName(Context context) {
DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_DISPLAY_NAME,
R.string.nameLabelsGroup, -1, -1, true,
- R.layout.text_fields_editor_view, android.R.style.TextAppearance_Large, -1));
+ R.layout.text_fields_editor_view, android.R.style.TextAppearance_Medium, -1));
boolean displayOrderPrimary =
context.getResources().getBoolean(R.bool.config_editor_field_order_primary);