title: Add TextView at runtime in Adapter
body: <p>append every message in array</p>
  
  <blockquote>
    <p>m.getGenre()</p>
  </blockquote>
  
  <p>as new message with TextView for every message in array i want to make TextView  for it and append </p>
  
  <p>this is CustomListAdapter inside it i want loop in array and append every item in array as new TextView  </p>
  
  <pre><code>public class CustomListAdapter extends BaseAdapter {
  private Activity activity;
  private LayoutInflater inflater;
  private List&lt;notofication&gt; movieItems;
  private final Context context;
  
  
  public CustomListAdapter(Activity activity, List&lt;notofication&gt; movieItems,Context c) {
      this.activity = activity;
      this.movieItems = movieItems;
      this.context = c;
  }
  
  @Override
  public int getCount() {
      return movieItems.size();
  }
  
  @Override
  public Object getItem(int location) {
      return movieItems.get(location);
  }
  
  @Override
  public long getItemId(int position) {
      return position;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
  
      if (inflater == null)
          inflater = (LayoutInflater) activity
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      if (convertView == null)
          convertView = inflater.inflate(R.layout.list_row, null);
  
  
      TextView title = (TextView) convertView.findViewById(R.id.title);
      TextView rating = (TextView) convertView.findViewById(R.id.rating);
      TextView genre = (TextView) convertView.findViewById(R.id.genre);
      TextView year = (TextView) convertView.findViewById(R.id.releaseYear);
  
      // getting movie data for the row
      final notofication m = movieItems.get(position);
  
  
  
  
  
  
  
      // title
      title.setText(m.getTitle());
  
  
  
      // rating
      rating.setText(String.valueOf(m.getRating()));
  
  
      String genreStr = "";
      for (String str : m.getGenre()) {
         //append every str as new textView
      }
  
  
      // release year
      year.setText(m.getYear());
  
      return convertView;
  }
  
  }
  </code></pre>
  
  <p>now the result will be something like this (its just example)</p>
  
  <p><a href="https://i.stack.imgur.com/ELkjo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ELkjo.png" alt="enter image description here"></a></p>
  
  <p>how can i make new textView for every message like this image </p>
  
  <p><a href="https://i.stack.imgur.com/TT4UK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TT4UK.png" alt="enter image description here"></a></p>
  
  <p>this is my code</p>
  
  <pre><code>    String genreStr = "";
      for (String str : m.getGenre()) {
         //append every str as new textView
      }
  </code></pre>
  
  <p>but i dont know how to make new TextView adn append it inside CustomAdapter</p>