title: How To Display Multiple Images At Runtime (Wraping to the next line)
body: <p>I have a rather strange application where I will get the words/symbols at runtime and wont know them in advance.  I need to display them and word wrap the text when it is too wide for the display.</p>
  
  <p>I am a little unsure what layout I should be using for this functionally but any hints would be greatly appreciated.  It would be nice if I could just add them to the card view and let it sort out the wrapping.  Is there a way to do this?</p>
  
  <p>The code below should have displayed "This is a sentence put together dynamically at runtime".</p>
  
  <p><img src="https://i.imgur.com/VZosOOA.jpg" alt="example output"></p>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MainActivity"&gt;
  
      &lt;android.support.v7.widget.CardView
          android:id="@+id/card"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:cardCornerRadius="40dp"
          android:layout_centerHorizontal="true"
          android:innerRadius="0dp"
          android:shape="ring"
          android:thicknessRatio="1.9"
          app:contentPadding="13dp"
          &gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/layout"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
  
                  android:orientation="horizontal"&gt;
  
              &lt;/LinearLayout&gt;
  
      &lt;/android.support.v7.widget.CardView&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>        LinearLayout ll = (LinearLayout)findViewById(R.id.layout);
  
          ImageView ivThis = new ImageView(MainActivity.this);
          ivThis.setImageResource(R.drawable.word_this);
          ll.addView(ivThis);
  
          ImageView ivIs = new ImageView(MainActivity.this);
          ivIs.setImageResource(R.drawable.word_is);
          ll.addView(ivIs);
  
          ImageView ivA = new ImageView(MainActivity.this);
          ivA.setImageResource(R.drawable.word_a);
          ll.addView(ivA);
  
          ImageView ivSentance = new ImageView(MainActivity.this);
          ivSentance.setImageResource(R.drawable.word_sentance);
          ll.addView(ivSentance);
  
          ImageView ivPut = new ImageView(MainActivity.this);
          ivPut.setImageResource(R.drawable.word_put);
          ll.addView(ivPut);
  
          ImageView ivTogether = new ImageView(MainActivity.this);
          ivTogether.setImageResource(R.drawable.word_together);
          ll.addView(ivTogether);
  
          ImageView ivDynamically = new ImageView(MainActivity.this);
          ivDynamically.setImageResource(R.drawable.word_dynamically);
          ll.addView(ivDynamically);
  
          ImageView ivAt = new ImageView(MainActivity.this);
          ivAt.setImageResource(R.drawable.word_at);
          ll.addView(ivAt);
  
          ImageView ivRuntime = new ImageView(MainActivity.this);
          ivDynamically.setImageResource(R.drawable.word_runtime);
          ll.addView(ivRuntime);
  </code></pre>