Esempio n. 1
0
 // 回话的未读的消息提示
 public void unreadcount() {
   int[] unread = ChatManager.getInstance().unreadcount(0);
   if ((unread[0] + unread[1] + unread[2]) > 0) {
     ll_unreadcount.setVisibility(View.VISIBLE);
     tv_unreadcount.setText((unread[0] + unread[1] + unread[2]) + "");
   } else {
     ll_unreadcount.setVisibility(View.INVISIBLE);
   }
 }
Esempio n. 2
0
  // 评论喝喜欢的新消息提示
  public void like_comment_count(TextView tv, LinearLayout ll) {
    ArrayList<NearHintMsg> nearHintMsg = ChatManager.getInstance().getNearHintMsg();
    if (nearHintMsg != null && nearHintMsg.size() > 0) {

      if (ll != null) ll.setVisibility(View.VISIBLE);
      else tv.setVisibility(View.VISIBLE);
      tv.setText(nearHintMsg.size() + "");

    } else {

      if (ll != null) ll.setVisibility(View.INVISIBLE);
      else tv.setVisibility(View.GONE);
    }
  }