Ejemplo n.º 1
0
 @Override
 public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   // TODO Auto-generated method stub
   BmobRecent recent = adapter.getItem(position);
   showDeleteDialog(recent);
   return true;
 }
Ejemplo n.º 2
0
 @Override
 public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   // TODO Auto-generated method stub
   BmobRecent recent = adapter.getItem(position);
   // 重置未读消息
   BmobDB.create(getActivity()).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(getActivity(), ChatActivity.class);
   intent.putExtra("user", user);
   startAnimActivity(intent);
 }