title: Distribut and align two views in LinearLayout (TextView + CheckBox) android
body: <p>I may have not the right keywords to looking for an already existing answer. I am not English native so I do not really know how to exactly describe my issue. Please orient me to an answer or correct keywords and close and/or edit my question if needed.</p>
  
  <p><strong>I want the checkbox to be align, no matter the size of the text next to it.</strong></p>
  
  <p>Here is what I have so far using nested LinearLayout:</p>
  
  <p><a href="https://i.stack.imgur.com/bsBf4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsBf4.png" alt="enter image description here"></a></p>
  
  <p>As you can see, when the price grow, the checkbox is not aligned anymore.</p>
  
  <p>Here is the XLM file:</p>
  
  <pre><code>&lt;androidx.cardview.widget.CardView
      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="wrap_content"
      android:backgroundTint="@color/colorPrimaryDark"
      app:cardCornerRadius="8dp"
      android:layout_margin="5dp"
      &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:layout_marginBottom="10dp"
          &gt;
  
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_marginBottom="-5dp"
              &gt;
  
              &lt;ImageView
                  android:id="@+id/itDelete"
                  android:layout_width="35dp"
                  android:layout_height="35dp"
                  android:layout_margin="10dp"
                  android:src="@drawable/ic_clear_blue"
                  android:scaleX=".9"
                  android:scaleY=".9"
                  /&gt;
  
              &lt;TextView
                  android:id="@+id/itName"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:paddingEnd="5dp"
                  android:ellipsize="end"
                  android:singleLine="true"
                  android:layout_gravity="center_vertical"
                  android:text="TextView super mega trop long de la mort"
                  android:textColor="@color/white"
                  android:textSize="22sp"
                  /&gt;
  
              &lt;ImageView
                  android:id="@+id/itMinus"
                  android:layout_width="35dp"
                  android:layout_height="35dp"
                  android:layout_gravity="end|center_vertical"
                  android:src="@drawable/ic_remove_circle_blue"
                  android:scaleY=".8"
                  android:scaleX=".8"
                  /&gt;
  
              &lt;TextView
                  android:id="@+id/itAmount"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="end|center_vertical"
                  android:layout_marginEnd="10dp"
                  android:layout_marginStart="10dp"
                  android:text="10"
                  android:textColor="@color/white"
                  android:textSize="22sp"
                  /&gt;
  
              &lt;ImageView
                  android:id="@+id/itPlus"
                  android:layout_width="35dp"
                  android:layout_height="35dp"
                  android:layout_gravity="end|center_vertical"
                  android:src="@drawable/ic_add_circle_blue"
                  android:scaleY=".8"
                  android:scaleX=".8"
                  /&gt;
  
  
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="horizontal"
              android:weightSum="2"
              &gt;
  
              &lt;TextView
                  android:id="@+id/itTotalPrice"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:paddingEnd="5dp"
                  android:paddingStart="5dp"
                  android:text="20.00$CAD"
                  android:textColor="@color/white"
                  android:textSize="18sp"
                  android:textStyle="normal"
                  android:textAlignment="textEnd"
                  /&gt;
  
              &lt;CheckBox
                  android:id="@+id/checkBox"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:text="@string/in_the_cart"
                  android:textColor="@color/white"
                  android:buttonTint="@color/colorPrimary"
                  /&gt;
          &lt;/LinearLayout&gt;
  
  
      &lt;/LinearLayout&gt;
  
  &lt;/androidx.cardview.widget.CardView&gt;
  </code></pre>
  
  <p>Maybe I miss some arguments I do not know about.</p>