diff --git a/res/values/strings.xml b/res/values/strings.xml index ba2a9e06c..43bf198af 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -207,11 +207,11 @@ Accounts - Inbox + Combined Inbox Unread - - Favorite + + Starred Drafts diff --git a/src/com/android/email/Utility.java b/src/com/android/email/Utility.java index 921c4f1a4..baba44e54 100644 --- a/src/com/android/email/Utility.java +++ b/src/com/android/email/Utility.java @@ -291,6 +291,8 @@ public class Utility { private String[] mSpecialMailbox = new String[] {}; private TypedArray mSpecialMailboxDrawable; private Drawable mDefaultMailboxDrawable; + private Drawable mSummaryStarredMailboxDrawable; + private Drawable mSummaryCombinedInboxDrawable; private FolderProperties(Context context) { mSpecialMailbox = context.getResources().getStringArray(R.array.mailbox_display_names); @@ -304,6 +306,10 @@ public class Utility { context.getResources().obtainTypedArray(R.array.mailbox_display_icons); mDefaultMailboxDrawable = context.getResources().getDrawable(R.drawable.ic_list_folder); + mSummaryStarredMailboxDrawable = + context.getResources().getDrawable(R.drawable.ic_list_starred); + mSummaryCombinedInboxDrawable = + context.getResources().getDrawable(R.drawable.ic_list_combined_inbox); } public static FolderProperties getInstance(Context context) { @@ -340,6 +346,19 @@ public class Utility { } return mDefaultMailboxDrawable; } + + public Drawable getSummaryMailboxIconIds(long mailboxKey) { + if (mailboxKey == Mailbox.QUERY_ALL_INBOXES) { + return mSummaryCombinedInboxDrawable; + } else if (mailboxKey == Mailbox.QUERY_ALL_FAVORITES) { + return mSummaryStarredMailboxDrawable; + } else if (mailboxKey == Mailbox.QUERY_ALL_DRAFTS) { + return mSpecialMailboxDrawable.getDrawable(Mailbox.TYPE_DRAFTS); + } else if (mailboxKey == Mailbox.QUERY_ALL_OUTBOX) { + return mSpecialMailboxDrawable.getDrawable(Mailbox.TYPE_OUTBOX); + } + return mDefaultMailboxDrawable; + } } private final static String HOSTAUTH_WHERE_CREDENTIALS = HostAuthColumns.ADDRESS + " like ?" diff --git a/src/com/android/email/activity/AccountFolderList.java b/src/com/android/email/activity/AccountFolderList.java index 62f60f011..1ebb97f87 100644 --- a/src/com/android/email/activity/AccountFolderList.java +++ b/src/com/android/email/activity/AccountFolderList.java @@ -301,7 +301,7 @@ public class AccountFolderList extends ListActivity row = childCursor.newRow(); row.add(Long.valueOf(Mailbox.QUERY_ALL_FAVORITES)); // MAILBOX_COLUMN_ID = 0; // MAILBOX_DISPLAY_NAME - row.add(getString(R.string.account_folder_list_summary_favorite)); + row.add(getString(R.string.account_folder_list_summary_starred)); row.add(null); // MAILBOX_ACCOUNT_KEY = 2; row.add(Integer.valueOf(Mailbox.TYPE_MAIL)); // MAILBOX_TYPE = 3; row.add(Integer.valueOf(count)); // MAILBOX_UNREAD_COUNT = 4; @@ -716,11 +716,7 @@ public class AccountFolderList extends ListActivity // Invisible (not "gone") to maintain spacing view.findViewById(R.id.chip).setVisibility(View.INVISIBLE); - int type = cursor.getInt(MAILBOX_TYPE); - String text = Utility.FolderProperties.getInstance(context).getDisplayName(type); - if (text == null) { - text = cursor.getString(MAILBOX_DISPLAY_NAME); - } + String text = cursor.getString(MAILBOX_DISPLAY_NAME); if (text != null) { TextView nameView = (TextView) view.findViewById(R.id.name); nameView.setText(text); @@ -765,7 +761,7 @@ public class AccountFolderList extends ListActivity view.findViewById(R.id.default_sender).setVisibility(View.GONE); view.findViewById(R.id.folder_icon).setVisibility(View.VISIBLE); ((ImageView)view.findViewById(R.id.folder_icon)).setImageDrawable( - Utility.FolderProperties.getInstance(context).getIconIds(type)); + Utility.FolderProperties.getInstance(context).getSummaryMailboxIconIds(id)); } private void bindAccountItem(View view, Context context, Cursor cursor, boolean isExpanded) diff --git a/src/com/android/email/activity/MessageList.java b/src/com/android/email/activity/MessageList.java index c607fc64c..2c148562d 100644 --- a/src/com/android/email/activity/MessageList.java +++ b/src/com/android/email/activity/MessageList.java @@ -1054,7 +1054,7 @@ public class MessageList extends ListActivity implements OnItemClickListener, On getString(R.string.account_folder_list_summary_inbox)}; } else if (mMailboxKey == Mailbox.QUERY_ALL_FAVORITES) { return new String[] {null, - getString(R.string.account_folder_list_summary_favorite)}; + getString(R.string.account_folder_list_summary_starred)}; } else if (mMailboxKey == Mailbox.QUERY_ALL_DRAFTS) { return new String[] {null, getString(R.string.account_folder_list_summary_drafts)};