Using proper Unread icon for unread "folder".

Fixes b/8967972.

Change-Id: I1089fdeac5803fd6f9bed19d1c22d0629814ba87
This commit is contained in:
Andrew Sapperstein 2013-05-16 11:53:23 -07:00
parent fff905416f
commit 7e75311926
8 changed files with 22 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 995 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 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:drawable="@drawable/ic_folder_mark_unread_holo_dark" />
<item android:drawable="@drawable/ic_folder_mark_unread_holo_light" />
</selector>

View File

@ -3008,8 +3008,7 @@ public class EmailProvider extends ContentProvider {
" NOT IN (SELECT " + MailboxColumns.ID + " FROM " + Mailbox.TABLE_NAME +
" WHERE " + MailboxColumns.TYPE + "=" + Mailbox.TYPE_TRASH + ")", null);
row[UIProvider.FOLDER_UNREAD_COUNT_COLUMN] = count;
// TODO: Hijacking the mark unread icon for now.
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_menu_mark_unread_holo_light;
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_folder_mark_unread;
mc.addRow(row);
return mc;
} else {
@ -3033,8 +3032,7 @@ public class EmailProvider extends ContentProvider {
" NOT IN (SELECT " + MailboxColumns.ID + " FROM " + Mailbox.TABLE_NAME +
" WHERE " + MailboxColumns.TYPE + "=" + Mailbox.TYPE_TRASH + ")", null);
row[UIProvider.FOLDER_UNREAD_COUNT_COLUMN] = numUnread;
// TODO: Hijacking the mark unread icon for now.
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_menu_mark_unread_holo_light;
row[UIProvider.FOLDER_ICON_RES_ID_COLUMN] = R.drawable.ic_folder_mark_unread;
mc.addRow(row);
Cursor[] cursors = new Cursor[] {mc, c};
return new MergeCursor(cursors);