--- a/src/com/beem/project/beem/ui/Chat.java Tue Dec 21 23:27:33 2010 +0100
+++ b/src/com/beem/project/beem/ui/Chat.java Tue Dec 21 23:45:46 2010 +0100
@@ -574,6 +574,12 @@
mContactStatusIcon.setImageLevel(mContact.getStatus());
}
+ /**
+ * Get a Drawable containing the avatar icon.
+ *
+ * @param avatarId the avatar id to retrieve or null to get default
+ * @return a Drawable
+ */
private Drawable getAvatarDrawable(String avatarId) {
Drawable avatarDrawable = null;
try {
--- a/src/com/beem/project/beem/ui/ContactList.java Tue Dec 21 23:27:33 2010 +0100
+++ b/src/com/beem/project/beem/ui/ContactList.java Tue Dec 21 23:45:46 2010 +0100
@@ -662,14 +662,19 @@
ImageView img = (ImageView) view.findViewById(R.id.avatar);
String avatarId = curContact.getAvatarId();
int contactStatus = curContact.getStatus();
- Drawable avatar = getAvatarStatusDrawable(curContact.getAvatarId(),
- curContact.getStatus());
+ Drawable avatar = getAvatarStatusDrawable(curContact.getAvatarId());
img.setImageDrawable(avatar);
img.setImageLevel(contactStatus);
}
}
- private Drawable getAvatarStatusDrawable(String avatarId, int contactStatus) {
+ /**
+ * Get a LayerDrawable containing the avatar and the status icon.
+ * The status icon will change with the level of the drawable.
+ * @param avatarId the avatar id to retrieve or null to get default
+ * @return a LayerDrawable
+ */
+ private Drawable getAvatarStatusDrawable(String avatarId) {
Drawable avatarDrawable = null;
try {
byte[] avatar = mXmppFacade.getAvatar(avatarId);