Пример #1
0
 @Override
 public int getItemCount() {
   if (post != null) {
     return post.getConversationList().size();
   }
   return 0;
 }
Пример #2
0
 @Override
 public void onBindViewHolder(final ConversationViewHolder holder, final int i) {
   if (post != null) { // TODO: 10/15/15 define conservation activity here
     HashMap<String, Object> conversation = post.getConversationList().get(i);
     String title = "You said:"; // TODO: remove hard code text
     if (!conversation.get("uid").toString().equalsIgnoreCase(FirebaseService.authData.getUid())) {
       title = "Advisor said:"; // TODO: remove hard code text
     }
     String message = BaseEntity.safeGetString(conversation, "text");
     String audio = BaseEntity.safeGetString(conversation, "audio");
     holder.view.setData(
         mixer, title, message, audio, BaseEntity.safeGetLong(conversation, "created_date"));
   }
 }