title: View pushed outside horizontally constraint layout
body: <p>How do we put a long <code>Textview</code> and an icon horizontally without having the <code>Textview</code> to push the icon outside the view.</p>
  
  <p>Played with <code>constrained_width</code> etc, but to no joy.</p>
  
  <pre><code>&lt;android.support.constraint.ConstraintLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content""&gt;
  
                      &lt;TextView
                          android:id="@+id/name"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          app:layout_constrainedWidth="true"
                          app:layout_constraintBottom_toBottomOf="parent"
                          app:layout_constraintEnd_toEndOf="parent"
                          app:layout_constraintStart_toStartOf="parent"
                          app:layout_constraintTop_toTopOf="parent"
                          tools:text="Text in the middle pushes the edit icon out of view oh noh!" /&gt;
  
                      &lt;ImageButton
                          android:id="@+id/edit"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:src="@drawable/edit_icon"
                          app:layout_constraintBottom_toBottomOf="parent"
                          app:layout_constraintStart_toEndOf="@id/name"
                          app:layout_constraintTop_toTopOf="parent" /&gt;
  
                  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>I want the <code>Textview</code> and the icon to be in the center aligned (horizontal). But as the text grows, the <code>Textview</code> pushes the edit icon outside the view. How do we put a <code>Textview</code> (variable width) with anything else horizontally without the <code>Textview</code> pushing others outside the screen.</p>
  
  <p>Icon pushed outside bounds</p>
  
  <p><a href="https://i.stack.imgur.com/4nZEY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4nZEY.jpg" alt="Icon pushed outside bounds"></a></p>
  
  <p>Need it to be something like this, with the views occupying the whole width
  <a href="https://i.stack.imgur.com/UsNn6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UsNn6.jpg" alt="Need it to be something like this, with the views occupying the whole width"></a></p>