# HG changeset patch # User Da Risk # Date 1274726696 -7200 # Node ID ea83164648a47587ced90cd716680d76823da2b8 # Parent 0e16dee2bd4c3369073273e674b365300be5149b Finish using LevelListDrawable diff -r 0e16dee2bd4c -r ea83164648a4 src/com/beem/project/beem/ui/ContactList.java --- a/src/com/beem/project/beem/ui/ContactList.java Mon May 24 18:57:37 2010 +0200 +++ b/src/com/beem/project/beem/ui/ContactList.java Mon May 24 20:44:56 2010 +0200 @@ -58,8 +58,6 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.SharedPreferences; -import android.graphics.BitmapFactory; -import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.LevelListDrawable; import android.os.Bundle; import android.os.Handler; @@ -120,7 +118,6 @@ private final ComparatorContactListByStatusAndName mComparator = new ComparatorContactListByStatusAndName(); private final BeemRosterListener mBeemRosterListener = new BeemRosterListener(); - private final Map mIconsMap = new HashMap(); private List mListContact; private IRoster mRoster; private String mCurGroup; @@ -281,7 +278,6 @@ this.registerReceiver(mReceiver, new IntentFilter(BeemBroadcastReceiver.BEEM_CONNECTION_CLOSED)); mInflater = getLayoutInflater(); - prepareIconsStatus(); } /** @@ -444,24 +440,6 @@ } /** - * Prepare Bitmap Map. - */ - private void prepareIconsStatus() { - mIconsMap.put(Status.CONTACT_STATUS_AVAILABLE, new BitmapDrawable(BitmapFactory.decodeResource(getResources(), - android.R.drawable.presence_online))); - mIconsMap.put(Status.CONTACT_STATUS_AVAILABLE_FOR_CHAT, - new BitmapDrawable(BitmapFactory.decodeResource(getResources(), android.R.drawable.presence_online))); - mIconsMap.put(Status.CONTACT_STATUS_AWAY, - new BitmapDrawable(BitmapFactory.decodeResource(getResources(), android.R.drawable.presence_away))); - mIconsMap.put(Status.CONTACT_STATUS_BUSY, - new BitmapDrawable(BitmapFactory.decodeResource(getResources(), android.R.drawable.presence_busy))); - mIconsMap.put(Status.CONTACT_STATUS_DISCONNECT, new BitmapDrawable(BitmapFactory.decodeResource(getResources(), - android.R.drawable.presence_offline))); - mIconsMap.put(Status.CONTACT_STATUS_UNAVAILABLE, new BitmapDrawable(BitmapFactory.decodeResource(getResources(), - R.drawable.status_requested))); - } - - /** * Sort the contact list. */ private void sortBeemContactList() {