Esempio n. 1
0
 @Override
 public void onBindViewHolder(ChatViewHolder holder, int position) {
   final String chatName = mKaaChatManager.getChats().get(position);
   ((TextView) holder.itemView).setText(chatName);
   holder.itemView.setOnLongClickListener(
       new View.OnLongClickListener() {
         @Override
         public boolean onLongClick(View v) {
           mKaaChatManager.deleteChatRoom(chatName);
           notifyDataSetChanged();
           return true;
         }
       });
 }
Esempio n. 2
0
 @Override
 public int getItemCount() {
   return mKaaChatManager.getChats().size();
 }