예제 #1
0
 @Override
 public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   BmobRecent recent = adapter.getItem(position);
   // 重置未读消息
   BmobDB.create(this).resetUnread(recent.getTargetid());
   // 组装聊天对象
   BmobChatUser user = new BmobChatUser();
   user.setAvatar(recent.getAvatar());
   user.setNick(recent.getNick());
   user.setUsername(recent.getUserName());
   user.setObjectId(recent.getTargetid());
   Intent intent = new Intent(this, ChatActivity.class);
   intent.putExtra("user", user);
   startAnimActivity(intent);
 }
예제 #2
0
 @Override
 public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   BmobRecent recent = adapter.getItem(position);
   showDeleteDialog(recent);
   return true;
 }