title: RecyclerView items go off screen
body: <p>I have a RecyclerView with elements in it, I want the delete button for the element to be on the right side.
  When I test it on an emulator or look at the look of it in Android Studio, it looks fine, but when I launch the application on a real device, the button goes beyond the borders of the screen.
  My question is how to set the right alignment for button, and do so the text does not overlapping the button, but ends with an ellipsis or wraps on the next line.</p>
  
  <p>On the emulator and in Android Studio:
  <a href="https://i.stack.imgur.com/kIhPT.png" rel="nofollow noreferrer">On emulator</a>
  <a href="https://i.stack.imgur.com/i6CPi.png" rel="nofollow noreferrer">In Android Studio</a></p>
  
  <p>But on my real device:
  <a href="https://i.stack.imgur.com/hUUkY.png" rel="nofollow noreferrer">On Samsung Galaxy Grand Prime VE Duos SM-G531H/DS</a></p>
  
  <p>My list_item_view.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="72dp"
      xmlns:tools="http://schemas.android.com/tools"
      android:padding="8dp"
      android:paddingStart="16dp"
      android:paddingEnd="16dp"
      android:gravity="center_vertical"
      android:orientation="horizontal"&gt;
  
  
      &lt;TextView
          android:id="@+id/text_list_item"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_vertical"
          android:textSize="24sp"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          tools:text="ExampleList" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center|end"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:srcCompat="@android:drawable/ic_menu_delete" /&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  
  <p>I would like to do something like this regarding text and buttons:
  <a href="https://i.stack.imgur.com/X2G4Y.png" rel="nofollow noreferrer">List in Mail app</a></p>