title: XML Horizontal and Vertical LinearLayout with Automatically
body: <p>I created a horizontal LinearLayout. And I added couple of TextViews. The problem is, the width isn't enough for this,thats why last TextViews didn't seem. I want it to look like the image below. Is there anyway to do this with XML codes. Thank you for helping.</p>
  
  <p>Which Layer should I use ? Or How can I do like image below.</p>
  
  <p><a href="https://i.stack.imgur.com/Rvrrh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rvrrh.png" alt="This is the image of what I want to do."></a></p>
  
  <p>I started with these xml codes.</p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/lyShf"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_below="@+id/widget71"
      android:layout_marginTop="@dimen/st_25dp"
      android:layout_marginLeft="@dimen/st_10dp"
      android:orientation="horizontal"&gt;
      &lt;TextView
          android:id="@+id/txShf1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
      &lt;TextView
          android:id="@+id/txShf3"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:layout_marginLeft="@dimen/st_5dp"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
      &lt;TextView
          android:id="@+id/txShf4"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:layout_marginLeft="@dimen/st_5dp"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
      &lt;TextView
          android:id="@+id/txShf5"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:layout_marginLeft="@dimen/st_5dp"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
      &lt;TextView
          android:id="@+id/txShf6"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:layout_marginLeft="@dimen/st_5dp"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
      &lt;TextView
          android:id="@+id/txShf7"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:background="@drawable/layout_frame_bej"
          android:layout_marginLeft="@dimen/st_5dp"
          android:textColor="#ffffff"
          android:padding="@dimen/st_5dp"
          android:text="sample"/&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>Solved: I found the solution by FlexboxLayout. You can look at this link for detail.</strong></p>
  
  <p><a href="https://android-developers.googleblog.com/2017/02/build-flexible-layouts-with.html" rel="nofollow noreferrer">https://android-developers.googleblog.com/2017/02/build-flexible-layouts-with.html</a></p>