Use new tab assets.
Also make the ContactsActivityList activity draw it's own list
separators, so that it can *not* draw the when an A-Z divider is
visible.
Change-Id: I0755a2cbcb57d646d770003844e394ac0de753ac
diff --git a/res/drawable-finger/ic_tab_selected_contacts.png b/res/drawable-finger/ic_tab_selected_contacts.png
index 16c4a91..9f11fc6 100644
--- a/res/drawable-finger/ic_tab_selected_contacts.png
+++ b/res/drawable-finger/ic_tab_selected_contacts.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_selected_dialer.png b/res/drawable-finger/ic_tab_selected_dialer.png
index cb715ed..6ac51ad 100644
--- a/res/drawable-finger/ic_tab_selected_dialer.png
+++ b/res/drawable-finger/ic_tab_selected_dialer.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_selected_recent.png b/res/drawable-finger/ic_tab_selected_recent.png
index bdbfc41..b87424b 100644
--- a/res/drawable-finger/ic_tab_selected_recent.png
+++ b/res/drawable-finger/ic_tab_selected_recent.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_selected_starred.png b/res/drawable-finger/ic_tab_selected_starred.png
index 1b884cb..89004a3 100644
--- a/res/drawable-finger/ic_tab_selected_starred.png
+++ b/res/drawable-finger/ic_tab_selected_starred.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_unselected_contacts.png b/res/drawable-finger/ic_tab_unselected_contacts.png
index 7b5b84f..93ff795 100644
--- a/res/drawable-finger/ic_tab_unselected_contacts.png
+++ b/res/drawable-finger/ic_tab_unselected_contacts.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_unselected_dialer.png b/res/drawable-finger/ic_tab_unselected_dialer.png
index dc3c5d8..c33c658 100644
--- a/res/drawable-finger/ic_tab_unselected_dialer.png
+++ b/res/drawable-finger/ic_tab_unselected_dialer.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_unselected_recent.png b/res/drawable-finger/ic_tab_unselected_recent.png
index 712e405..3da6583 100644
--- a/res/drawable-finger/ic_tab_unselected_recent.png
+++ b/res/drawable-finger/ic_tab_unselected_recent.png
Binary files differ
diff --git a/res/drawable-finger/ic_tab_unselected_starred.png b/res/drawable-finger/ic_tab_unselected_starred.png
index 8eaccb8..f2ebc3b 100644
--- a/res/drawable-finger/ic_tab_unselected_starred.png
+++ b/res/drawable-finger/ic_tab_unselected_starred.png
Binary files differ
diff --git a/res/drawable-finger/tab_left_arrow.png b/res/drawable-finger/tab_left_arrow.png
index 2008b80..e35d58d 100644
--- a/res/drawable-finger/tab_left_arrow.png
+++ b/res/drawable-finger/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable-finger/tab_right_arrow.png b/res/drawable-finger/tab_right_arrow.png
index 50f172b..8acbba0 100644
--- a/res/drawable-finger/tab_right_arrow.png
+++ b/res/drawable-finger/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable-finger/tab_unselected.9.png b/res/drawable-finger/tab_unselected.9.png
index fce7d87..a79fa2a 100644
--- a/res/drawable-finger/tab_unselected.9.png
+++ b/res/drawable-finger/tab_unselected.9.png
Binary files differ
diff --git a/res/layout-finger/contacts_list_item.xml b/res/layout-finger/contacts_list_item.xml
index b539bb0..8efec3d 100644
--- a/res/layout-finger/contacts_list_item.xml
+++ b/res/layout-finger/contacts_list_item.xml
@@ -27,7 +27,13 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#444444"
- android:gravity="center"
+ android:gravity="center_horizontal"
+ />
+
+ <View android:id="@+id/list_divider"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@android:drawable/divider_horizontal_dark"
/>
<RelativeLayout
diff --git a/res/layout-finger/contacts_list_item_photo.xml b/res/layout-finger/contacts_list_item_photo.xml
index 915e78e..279297d 100644
--- a/res/layout-finger/contacts_list_item_photo.xml
+++ b/res/layout-finger/contacts_list_item_photo.xml
@@ -27,6 +27,12 @@
layout="@layout/list_separator"
/>
+ <View android:id="@+id/list_divider"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:background="@android:drawable/divider_horizontal_dark"
+ />
+
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
diff --git a/res/layout-finger/dialer_activity.xml b/res/layout-finger/dialer_activity.xml
index 242821b..29189c7 100644
--- a/res/layout-finger/dialer_activity.xml
+++ b/res/layout-finger/dialer_activity.xml
@@ -26,10 +26,7 @@
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
- android:layout_height="68dip"
- android:paddingLeft="1dip"
- android:paddingRight="1dip"
- android:paddingTop="4dip"
+ android:layout_height="wrap_content"
/>
<FrameLayout android:id="@android:id/tabcontent"
diff --git a/res/layout-finger/list_separator.xml b/res/layout-finger/list_separator.xml
index 0c21541..2ab4859 100644
--- a/res/layout-finger/list_separator.xml
+++ b/res/layout-finger/list_separator.xml
@@ -17,4 +17,6 @@
<!-- Layout used for list separators. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
style="?android:attr/listSeparatorTextViewStyle"
+ android:textColor="@*android:color/dim_foreground_dark"
+ android:gravity="center_horizontal"
/>
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index 936396d..42a1d04 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -495,6 +495,9 @@
// Setup the UI
final ListView list = getListView();
+ // Tell list view to not show dividers. We'll do it ourself so that we can *not* show
+ // them when an A-Z headers is visible.
+ list.setDividerHeight(0);
list.setFocusable(true);
list.setOnCreateContextMenuListener(this);
if ((mMode & MODE_MASK_NO_FILTER) != MODE_MASK_NO_FILTER) {
@@ -1525,6 +1528,7 @@
final static class ContactListItemCache {
public TextView header;
+ public View divider;
public TextView nameView;
public CharArrayBuffer nameBuffer = new CharArrayBuffer(128);
public TextView labelView;
@@ -1772,6 +1776,7 @@
final ContactListItemCache cache = new ContactListItemCache();
cache.header = (TextView) view.findViewById(R.id.header);
+ cache.divider = (View) view.findViewById(R.id.list_divider);
cache.nameView = (TextView) view.findViewById(R.id.name);
cache.labelView = (TextView) view.findViewById(R.id.label);
cache.dataView = (TextView) view.findViewById(R.id.data);
@@ -1923,13 +1928,16 @@
final ContactListItemCache cache = (ContactListItemCache) view.getTag();
if (!displaySectionHeaders) {
cache.header.setVisibility(View.GONE);
+ cache.divider.setVisibility(View.VISIBLE);
} else {
final int section = getSectionForPosition(position);
if (getPositionForSection(section) == position) {
cache.header.setText(mIndexer.getSections()[section].toString());
cache.header.setVisibility(View.VISIBLE);
+ cache.divider.setVisibility(View.GONE);
} else {
cache.header.setVisibility(View.GONE);
+ cache.divider.setVisibility(View.VISIBLE);
}
}
}