title: Unknown items in a scroll view
body: <p>I got an interesting problem for you this time. I have an online app on android that I have to update. They want to place the discounts on the main page, "Dispensary Info" as I named it and for now it is in a <code>scrollview</code>. The problem is that I don't know how many products are in a dispensary(they have more dispensaries) and I don't know how many of them have discounts. Their number variate. There are 3 solution that I can see as a junior programmer:</p>
  
  <ol>
  <li>To generate <code>textviews</code> programmatically.</li>
  <li>To make a <code>listview</code> with an adapter starting only with the second element.</li>
  <li>To make a table.</li>
  </ol>
  
  <p>None of those solution I know how to use...</p>
  
  <pre><code>&lt;RelativeLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  
  &lt;ScrollView
      android:id="@+id/scroll"
      android:layout_width="fill_parent"
      android:layout_marginBottom="50dp"
      android:layout_height="fill_parent"&gt;
  
      &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"&gt;
  
          &lt;ImageView
              android:id="@+id/dispensaryPicture"
              android:layout_width="1000sp"
              android:scaleType="centerCrop"
              android:layout_height="150sp"
              android:layout_alignParentStart="true"
              android:layout_alignParentTop="true" /&gt;
  
          &lt;RatingBar
              android:id="@+id/ratingBarDispensaries"
              android:layout_width="wrap_content"
              android:layout_height="50sp"
              android:layout_alignStart="@+id/dispensaryStateAndZipcode"
              android:layout_alignTop="@+id/textView14"
              android:progressTint="@color/valet_hop_gold"
              android:scaleX="0.5"
              android:scaleY="0.5" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensaryName"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentStart="true"
              android:layout_below="@+id/dispensaryPicture"
              android:layout_marginStart="21dp"
              android:layout_marginTop="15dp"
              android:text="TextView"
              android:textColor="@color/black" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensaryAdress"
              android:layout_width="wrap_content"
  
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/dispensaryName"
              android:layout_below="@+id/dispensaryName"
              android:text="TextView" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensaryStateAndZipcode"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/dispensaryAdress"
              android:layout_below="@+id/dispensaryAdress"
              android:text="TextView" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensaryRaiting"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/dispensaryStateAndZipcode"
              android:layout_below="@+id/dispensaryStateAndZipcode"
              android:text="Raiting:" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensarySchedule"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/ratingBarDispensaries"
              android:layout_below="@+id/ratingBarDispensaries"
              android:text="TextView" /&gt;
  
          &lt;TextView
              android:id="@+id/dispensaryDescription"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/dispensaryRaiting"
              android:layout_below="@+id/dispensarySchedule"
              android:layout_marginTop="17dp"
              android:text="TextView" /&gt;
  
          &lt;TextView
              android:id="@+id/indicator"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/dispensaryDescription"
              android:layout_below="@+id/dispensaryDescription"
              android:layout_marginTop="15sp"
              android:text="FIRST TIME PATIENT DEAL"
              android:textColor="@color/valet_green" /&gt;
  
          &lt;TextView
              android:id="@+id/firstTimeDeal"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignStart="@+id/indicator"
              android:layout_below="@+id/indicator"
              android:layout_marginBottom="5sp"
              android:layout_marginTop="15sp"
              android:text="" /&gt;
  
          &lt;Button
              android:id="@+id/writeAReview"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:layout_alignEnd="@+id/textView14"
              android:layout_below="@+id/dispensaryName"
              android:layout_marginEnd="14dp"
              android:background="@drawable/pencil"
              android:text="" /&gt;
  
          &lt;TextView
              android:id="@+id/textView14"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignBottom="@+id/dispensaryStateAndZipcode"
              android:layout_alignParentEnd="true"
              android:layout_marginEnd="13dp"
              android:text="Write a review"
              android:textSize="10sp" /&gt;
          &lt;TextView
              android:id="@+id/miles"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_above="@+id/writeAReview"
              android:textSize="15dp"
              android:layout_alignEnd="@+id/textView14"
              android:text="TextView" /&gt;
      &lt;/RelativeLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is the <code>xml</code> file. I think it would be easier to understand if you place this into a project and see for yourselves how the page is set for now.</p>