src/com/beem/project/beem/ui/ContactList.java
changeset 892 d23d8ad3b9ba
parent 888 0173963643d1
child 907 7b5e29b3603b
equal deleted inserted replaced
891:2236fe5b2db1 892:d23d8ad3b9ba
   663 		v = (TextView) view.findViewById(R.id.contactlistmsgperso);
   663 		v = (TextView) view.findViewById(R.id.contactlistmsgperso);
   664 		v.setText(curContact.getMsgState());
   664 		v.setText(curContact.getMsgState());
   665 		ImageView img = (ImageView) view.findViewById(R.id.avatar);
   665 		ImageView img = (ImageView) view.findViewById(R.id.avatar);
   666 		String avatarId = curContact.getAvatarId();
   666 		String avatarId = curContact.getAvatarId();
   667 		int contactStatus = curContact.getStatus();
   667 		int contactStatus = curContact.getStatus();
   668 		Drawable avatar = getAvatarStatusDrawable(curContact.getAvatarId());
   668 		Drawable avatar = getAvatarStatusDrawable(avatarId);
   669 		img.setImageDrawable(avatar);
   669 		img.setImageDrawable(avatar);
   670 		img.setImageLevel(contactStatus);
   670 		img.setImageLevel(contactStatus);
   671 	    }
   671 	    }
   672 	}
   672 	}
   673 
   673 
   689 		    } finally {
   689 		    } finally {
   690 			if (in != null)
   690 			if (in != null)
   691 			    in.close();
   691 			    in.close();
   692 		    }
   692 		    }
   693 		} catch (IOException e) {
   693 		} catch (IOException e) {
   694 		    Log.w(TAG, "Error while setting the avatar", e);
   694 		    Log.w(TAG, "Error while setting the avatar " + avatarId, e);
   695 		}
   695 		}
   696 	    }
   696 	    }
   697 	    if (avatarDrawable == null)
   697 	    if (avatarDrawable == null)
   698 		avatarDrawable = getResources().getDrawable(R.drawable.beem_launcher_icon_silver);
   698 		avatarDrawable = getResources().getDrawable(R.drawable.beem_launcher_icon_silver);
   699 	    LayerDrawable ld = (LayerDrawable) getResources().getDrawable(R.drawable.avatar_status);
   699 	    LayerDrawable ld = (LayerDrawable) getResources().getDrawable(R.drawable.avatar_status);