From 6fc728b7cd963ef7ed1e6d8749cd50ccd9b24f38 Mon Sep 17 00:00:00 2001 From: Mindy Pereira Date: Thu, 17 Nov 2011 16:31:09 -0800 Subject: [PATCH] ListView eill always show dividers below items if all items in the adapter are enabled. It seems like it should not show a divider on the last item when there are headers OR infer not all items enabled when there are headers, but it doesn't. Fixes b/5517092 extra divider line between last label and next header in label list Change-Id: Ib0f0361e672edcc36c973166c062b67e61ec59c4 --- src/com/android/email/activity/MailboxFragmentAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/email/activity/MailboxFragmentAdapter.java b/src/com/android/email/activity/MailboxFragmentAdapter.java index f486a8841..a86a2ab3c 100644 --- a/src/com/android/email/activity/MailboxFragmentAdapter.java +++ b/src/com/android/email/activity/MailboxFragmentAdapter.java @@ -191,6 +191,13 @@ class MailboxFragmentAdapter extends CursorAdapter { return !isHeader(position); } + // The LabelList has headers which are not + // enabled. + @Override + public boolean areAllItemsEnabled() { + return false; + } + @Override public void bindView(View view, Context context, Cursor cursor) { if (view instanceof MailboxListItem) {