am a39992fd
: Merge change 21479 into eclair
Merge commit 'a39992fd7da83197ef5b7bff7d29d6916c2e8adc' * commit 'a39992fd7da83197ef5b7bff7d29d6916c2e8adc': Use custom icons for special mailboxes
BIN
res/drawable/ic_list_combined_inbox.png
Normal file
After Width: | Height: | Size: 1022 B |
BIN
res/drawable/ic_list_drafts.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
res/drawable/ic_list_folder.png
Normal file
After Width: | Height: | Size: 628 B |
BIN
res/drawable/ic_list_inbox.png
Normal file
After Width: | Height: | Size: 758 B |
BIN
res/drawable/ic_list_outbox.png
Normal file
After Width: | Height: | Size: 928 B |
BIN
res/drawable/ic_list_sent.png
Normal file
After Width: | Height: | Size: 1018 B |
BIN
res/drawable/ic_list_spam.png
Normal file
After Width: | Height: | Size: 1004 B |
BIN
res/drawable/ic_list_starred.png
Normal file
After Width: | Height: | Size: 796 B |
BIN
res/drawable/ic_list_trash.png
Normal file
After Width: | Height: | Size: 852 B |
@ -32,7 +32,7 @@
|
||||
android:id="@+id/folder_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/expander_ic_folder_minimized"
|
||||
android:src="@drawable/ic_list_folder"
|
||||
android:paddingLeft="2dip"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dip"
|
||||
|
@ -47,6 +47,7 @@ import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.CursorAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
@ -409,6 +410,7 @@ public class MailboxList extends ListActivity implements OnItemClickListener, On
|
||||
MailboxColumns.DISPLAY_NAME, MailboxColumns.UNREAD_COUNT, MailboxColumns.TYPE };
|
||||
private final int COLUMN_DISPLAY_NAME = 1;
|
||||
private final int COLUMN_UNREAD_COUNT = 2;
|
||||
private final int COLUMN_TYPE = 3;
|
||||
|
||||
Context mContext;
|
||||
private LayoutInflater mInflater;
|
||||
@ -456,7 +458,29 @@ public class MailboxList extends ListActivity implements OnItemClickListener, On
|
||||
nameView.setTypeface(Typeface.DEFAULT);
|
||||
countView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
ImageView folderIcon = (ImageView) view.findViewById(R.id.folder_icon);
|
||||
int type = cursor.getInt(COLUMN_TYPE);
|
||||
int resId = -1;
|
||||
switch (type) {
|
||||
case Mailbox.TYPE_INBOX:
|
||||
resId = R.drawable.ic_list_inbox;
|
||||
break;
|
||||
case Mailbox.TYPE_OUTBOX:
|
||||
resId = R.drawable.ic_list_outbox;
|
||||
break;
|
||||
case Mailbox.TYPE_DRAFTS:
|
||||
resId = R.drawable.ic_list_drafts;
|
||||
break;
|
||||
case Mailbox.TYPE_SENT:
|
||||
resId = R.drawable.ic_list_sent;
|
||||
break;
|
||||
case Mailbox.TYPE_TRASH:
|
||||
resId = R.drawable.ic_list_trash;
|
||||
default:
|
||||
resId = R.drawable.ic_list_folder;
|
||||
break;
|
||||
}
|
||||
folderIcon.setImageResource(resId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|