summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Sliwowski <psliwowski@google.com>2013-09-10 22:08:40 -0700
committerPaul Sliwowski <psliwowski@google.com>2013-09-10 22:08:40 -0700
commite1d3c390975751ec0eec838685de90b3938e7978 (patch)
tree37b2c69dd105066b2288c5acbc14ffcd2bba1b5b
parent9a0f2498251247781c7ff0f20dc09c509eccecc9 (diff)
downloadandroid_packages_apps_ContactsCommon-e1d3c390975751ec0eec838685de90b3938e7978.tar.gz
android_packages_apps_ContactsCommon-e1d3c390975751ec0eec838685de90b3938e7978.tar.bz2
android_packages_apps_ContactsCommon-e1d3c390975751ec0eec838685de90b3938e7978.zip
Update ContactCommon to handle new ui changes for People App.
Change-Id: Icfa18259718c98b51468f93f2031eb2e0ed3629b
-rw-r--r--res/color/primary_text_color.xml22
-rw-r--r--res/color/secondary_text_color.xml22
-rw-r--r--res/values/colors.xml6
-rw-r--r--src/com/android/contacts/common/list/ContactListAdapter.java12
4 files changed, 18 insertions, 44 deletions
diff --git a/res/color/primary_text_color.xml b/res/color/primary_text_color.xml
deleted file mode 100644
index acc2fb7a..00000000
--- a/res/color/primary_text_color.xml
+++ /dev/null
@@ -1,22 +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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_activated="true" android:color="#FFFFFF" />
- <item android:color="#333333" /> <!-- not selected -->
-
-</selector>
diff --git a/res/color/secondary_text_color.xml b/res/color/secondary_text_color.xml
deleted file mode 100644
index 1c624587..00000000
--- a/res/color/secondary_text_color.xml
+++ /dev/null
@@ -1,22 +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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_activated="true" android:color="#FFFFFF" />
- <item android:color="#777777" /> <!-- not selected -->
-
-</selector>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e00cdb8c..709a205b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,6 +17,12 @@
<resources>
<!-- Divider color for header separator -->
+ <color name="primary_text_color">#363636</color>
+
+ <!-- Divider color for header separator -->
+ <color name="secondary_text_color">#777777</color>
+
+ <!-- Divider color for header separator -->
<color name="main_header_separator_color">#AAAAAA</color>
<!-- Divider color for header separator -->
diff --git a/src/com/android/contacts/common/list/ContactListAdapter.java b/src/com/android/contacts/common/list/ContactListAdapter.java
index 1be48c42..3ad1801a 100644
--- a/src/com/android/contacts/common/list/ContactListAdapter.java
+++ b/src/com/android/contacts/common/list/ContactListAdapter.java
@@ -100,6 +100,7 @@ public abstract class ContactListAdapter extends ContactEntryListAdapter {
private long mSelectedContactDirectoryId;
private String mSelectedContactLookupKey;
private long mSelectedContactId;
+ private ContactListItemView.PhotoPosition mPhotoPosition;
public ContactListAdapter(Context context) {
super(context);
@@ -107,6 +108,14 @@ public abstract class ContactListAdapter extends ContactEntryListAdapter {
mUnknownNameText = context.getText(R.string.missing_name);
}
+ public void setPhotoPosition(ContactListItemView.PhotoPosition photoPosition) {
+ mPhotoPosition = photoPosition;
+ }
+
+ public ContactListItemView.PhotoPosition getPhotoPosition() {
+ return mPhotoPosition;
+ }
+
public CharSequence getUnknownNameText() {
return mUnknownNameText;
}
@@ -189,6 +198,9 @@ public abstract class ContactListAdapter extends ContactEntryListAdapter {
view.setUnknownNameText(mUnknownNameText);
view.setQuickContactEnabled(isQuickContactEnabled());
view.setActivatedStateSupported(isSelectionVisible());
+ if (mPhotoPosition != null) {
+ view.setPhotoPosition(mPhotoPosition);
+ }
return view;
}