title: how to display multiple Textcard in cardview using method voidbind() of adapter
body: <p>This is my code:</p>
  
  <pre><code>public class MessageListAdapter extends RecyclerView.Adapter {
      public static String TAG = MessageListAdapter.class.getName();
  
      private static final int VIEW_TYPE_MESSAGE_SENT = 1;
      private static final int VIEW_TYPE_MESSAGE_RECEIVED = 2;
       private static final int VIEW_TYPE_ACTIONCARD = 3;
      private static final int VIEW_TYPE_TEXTCARD = 5;
      private static final int VIEW_TYPE_IMAGECARD = 4;
      private Context mContext;
      private List&lt;Message&gt; mMessageList;
      private ChipClick mChipClick;
  
  
  
      public MessageListAdapter(Context context, List&lt;Message&gt; messageList, List&lt;TextCard&gt; developersLists, ChipClick chipClick) {
          //public MessageListAdapter(Context context, List&lt;Message&gt; messageList, ChipClick chipClick) {
          mContext = context;
          mMessageList = messageList;
          dev  = developersLists;
          mChipClick = chipClick;
          developersLists = new ArrayList&lt;&gt;();
      }
  
      @Override
      public int getItemCount() {
          return mMessageList.size();
      }
  
      // Determines the appropriate ViewType according to the sender of the message.
      @Override
      public int getItemViewType(int position) {
          Message message = (Message) mMessageList.get(position);
          if (message.isSenderBot()) {
              // If the current user is the sender of the message
              return VIEW_TYPE_MESSAGE_SENT;
          }
          else if (message.getImageCard() != null){
              return  VIEW_TYPE_IMAGECARD;
          }
          else if ( message.getTextCard() != null){  //message.getTextCard()
              return  VIEW_TYPE_TEXTCARD;
          }
          else {
              // If some other user sent the message
              return VIEW_TYPE_MESSAGE_RECEIVED;
          }
  
      }
  
      // Inflates the appropriate layout according to the ViewType.
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view;
  
          if (viewType == VIEW_TYPE_MESSAGE_SENT) {
              view = LayoutInflater.from(parent.getContext())
                      .inflate(R.layout.item_message_sent, parent, false);
              return new SentMessageHolder(view);
          } else if (viewType == VIEW_TYPE_MESSAGE_RECEIVED) {
              view = LayoutInflater.from(parent.getContext())
                      .inflate(R.layout.item_message_redeived, parent, false);
              return new ReceivedMessageHolder(view);
          }
          else if (viewType == VIEW_TYPE_IMAGECARD) {
              view = LayoutInflater.from(parent.getContext())
                      .inflate(R.layout.imagecard, parent, false);
              return new ImageCardHolder(view);
          }
          else if (viewType == VIEW_TYPE_TEXTCARD) {
              view = LayoutInflater.from(parent.getContext())
                      .inflate(R.layout.textcard, parent, false);
              return new TextCardHolder(view);
          }
          return null;
      }
  
      // Passes the message object to a ViewHolder so that the contents can be bound to UI.
      @Override
      public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
          Message message = (Message) mMessageList.get(position);
  
          switch (holder.getItemViewType()) {
              case VIEW_TYPE_MESSAGE_SENT:
                  ((SentMessageHolder) holder).bind(message);
                  break;
              case VIEW_TYPE_MESSAGE_RECEIVED:
                  ((ReceivedMessageHolder) holder).bind(message);
                  break;
              case VIEW_TYPE_IMAGECARD:
                  ((ImageCardHolder) holder).bind(message);
                  break;
              case VIEW_TYPE_TEXTCARD:
                  ((TextCardHolder)holder).bind(message,position);
  
  
          }
      }
  
      private class SentMessageHolder extends RecyclerView.ViewHolder {
          TextView messageText, timeText;
  
          SentMessageHolder(View itemView) {
              super(itemView);
              messageText = (TextView) itemView.findViewById(R.id.text_message_body);
              timeText = (TextView) itemView.findViewById(R.id.text_message_time);
          }
  
          void bind(Message message) {
              messageText.setText(message.getMessage());
              timeText.setText(Util.formatDateTime(message.getCreatedAt()));
          }
      }
  
      private class ReceivedMessageHolder extends RecyclerView.ViewHolder {
  
          ConstraintLayout constraintLayout;
  
          ImageView profileImage;
          TextView textMessage;
          TextView timeText;
  
          ChipGroup chipGroup;
          Chip chip;
  
          ReceivedMessageHolder(View itemView) {
              super(itemView);
              constraintLayout = (ConstraintLayout) itemView.findViewById(R.id.parentCard);
  
              profileImage = (ImageView) itemView.findViewById(R.id.image_message_profile);
              textMessage = (TextView) itemView.findViewById(R.id.text_message);
              timeText = (TextView) itemView.findViewById(R.id.text_message_time);
  
              chipGroup = (ChipGroup) itemView.findViewById(R.id.chipGroup);
          }
  
          void bind(final Message message) {         
  
                  textMessage.setText(message.getMessage());
              timeText.setText(Util.formatDateTime(message.getCreatedAt()));
          }
  
      }   
  
      private class TextCardHolder extends RecyclerView.ViewHolder {
  
          TextView Textcardtitle;
          TextView Textcardcontent;
  
          public TextCardHolder(View view) {
              super(view);
              Textcardtitle = (TextView) view.findViewById(R.id.textcardTitle);
              Textcardcontent = (TextView)view.findViewById(R.id.textcardContent);
          }
  
          public void bind(Message message, int position) {
  
              Textcardtitle.setText(message.getTextCard().iterator().next().getTitle());
              Textcardcontent.setText(message.getTextCard()
                      .iterator().next().getDescriptions()
                      .iterator().next().getDescription());
  
             for (int i = 0; i &lt; message.getTextCard().size(); i++) {
                  Log.d(TAG,"Descriptions1 "+message.getTextCard().listIterator(i).next().
                          getDescriptions().iterator().next().getDescription() +
                          " TITLE   " +message.getTextCard().listIterator(i).next().getTitle());
              }
          }
  
  
      }
  
  }
  </code></pre>
  
  <p>This is my full adapter code.
  The message object has list of textcard which has multiple values. But <code>void bind()</code> displays only one text card, not multiple. </p>
  
  <p>How to display all multiple cards which has values, title and description. I tried in loop , it displays all values in loop in logcat, but displaying only last value. I tried setting text inside loop but still it doesn't displays.</p>
  
  <p>My message model class has:
   <code>List&lt;TextCard&gt; textCard;</code></p>
  
  <p>TextCard Model class has:</p>
  
  <p><code>@SerializedName("Title")
      @Expose
      private String Title
      @SerializedName("content")
      @Expose
      private String content;
   @SerializedName("Descriptions")
      @Expose
      private List&lt;TextCardDescription&gt; descriptions = null;</code></p>
  
  <p>TextCard Description has:
  <code>@SerializedName("Description")
      @Expose
      private String Description;</code></p>
  
  <p>I am using Parcalable to parse all this data from api service.</p>
  
  <p>Please help me in displaying multiple textcards from ArrayList,
  As I am new to  android</p>
  
  <p>The logs:</p>
  
  <blockquote>
    <p>Descriptions1 Place were peshwas would stay TITLE   Shaniwar Wada</p>
    
    <p>Descriptions1 ford concures by Shivaji Maharaj TITLE   Sinhagad</p>
  </blockquote>