private void onClickChat() {
   String userName = FriendFacade.getInstance().getFriendName(mUid);
   if (userName == null) {
     return;
   }
   Intent i = new Intent(AppContext.getAppContext(), MainUIActivity.class);
   i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
   i.putExtra(NotificationFactory.CHAT_ROOM_ID, MessageIdUtils.createRoomId(mUid));
   i.putExtra(NotificationFactory.CHAT_ROOM_NAME, userName != null ? userName : mUid);
   startActivity(i);
 }
Ejemplo n.º 2
0
 private void initLogo(Message item, View view) {
   ViewTag tag = (ViewTag) view.getTag();
   String uid = item.getUid();
   String currentUid = UserInfo.getInstance().getUid();
   int width = AppContext.getDimensionPixelSize(R.dimen.msg_time_size);
   if (currentUid.equalsIgnoreCase(uid)) {
     BitmapLoaderManager.getInstance()
         .loadBitmap(
             ImageSizeUtils.get96x96(UserInfo.getInstance().getUserLogo()),
             tag.icon,
             width,
             width,
             AppContext.getBitmap(R.drawable.icon_96x96));
   } else {
     BitmapLoaderManager.getInstance()
         .loadBitmap(
             ImageSizeUtils.get96x96(FriendFacade.getInstance().getFriendLogo(uid)),
             tag.icon,
             width,
             width,
             AppContext.getBitmap(R.drawable.icon_96x96));
   }
 }