Finish using LevelListDrawable
authorDa Risk <darisk972@gmail.com>
Mon, 24 May 2010 20:44:56 +0200
changeset 753 ea83164648a4
parent 752 0e16dee2bd4c
child 754 151841f2b1a1
Finish using LevelListDrawable
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<Contact> mComparator =
 	new ComparatorContactListByStatusAndName<Contact>();
     private final BeemRosterListener mBeemRosterListener = new BeemRosterListener();
-    private final Map<Integer, BitmapDrawable> mIconsMap = new HashMap<Integer, BitmapDrawable>();
     private List<Contact> 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() {