>
<include
android:id="@+id/header"
- layout="@layout/list_separator"
+ layout="@layout/list_section"
/>
<RelativeLayout
>
<include
android:id="@+id/header"
- layout="@layout/list_separator"
+ layout="@layout/list_section"
/>
<RelativeLayout
<View android:id="@+id/list_divider"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:background="@*android:drawable/divider_horizontal_dark_opaque"
+ android:background="@drawable/divider_dark_opaque"
/>
</LinearLayout>
--- /dev/null
+<?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.
+-->
+
+<!-- Layout used for list section separators. -->
+<RelativeLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="25dip"
+ android:background="@drawable/section_dark"
+ >
+ <TextView
+ android:id="@+id/header_text"
+ android:layout_width="56dip"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_alignParentLeft="true"
+ android:textStyle="bold"
+ android:textColor="#ffbfbfbf"
+ android:textSize="14sp"
+ android:gravity="center"
+ />
+ <View
+ android:layout_width="fill_parent"
+ android:layout_height="1dip"
+ android:layout_alignParentBottom="true"
+ android:background="@drawable/divider_dark_opaque"
+ />
+</RelativeLayout>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/totalContactsText"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- style="?android:attr/listSeparatorTextViewStyle"
- android:textColor="@*android:color/dim_foreground_dark"
- android:textSize="12sp"
+ android:layout_height="25dip"
+ android:textColor="#ffbfbfbf"
+ android:textSize="14sp"
android:textStyle="normal"
- android:background="@drawable/section_dark"
+ android:background="@drawable/infobar_dark"
android:paddingLeft="7dp"
- android:gravity="center|center_vertical"
+ android:gravity="center"
/>
\ No newline at end of file
<item
android:id="@+id/menu_split"
- android:icon="@drawable/ic_menu_merge"
+ android:icon="@drawable/ic_menu_split"
android:title="@string/menu_splitAggregate" />
<item
}
final static class ContactListItemCache {
- public TextView header;
+ public View header;
+ public TextView headerText;
public View divider;
public TextView nameView;
public View callView;
final View view = super.newView(context, cursor, parent);
final ContactListItemCache cache = new ContactListItemCache();
- cache.header = (TextView) view.findViewById(R.id.header);
+ cache.header = view.findViewById(R.id.header);
+ cache.headerText = (TextView)view.findViewById(R.id.header_text);
cache.divider = view.findViewById(R.id.list_divider);
cache.nameView = (TextView) view.findViewById(R.id.name);
cache.callView = view.findViewById(R.id.call_view);
} else {
final int section = getSectionForPosition(position);
if (getPositionForSection(section) == position) {
- cache.header.setText(mIndexer.getSections()[section].toString());
- cache.header.setVisibility(View.VISIBLE);
+ String title = mIndexer.getSections()[section].toString().trim();
+ if (!TextUtils.isEmpty(title)) {
+ cache.headerText.setText(title);
+ cache.header.setVisibility(View.VISIBLE);
+ } else {
+ cache.header.setVisibility(View.GONE);
+ }
} else {
cache.header.setVisibility(View.GONE);
}