title: Android - Checkbox centering and filling layout
body: <p>I have a spinner which has an item template. Inside I have a textview and a checkbox that fills the layout, but it is fixed at left border (see image). How do I make checkbox centered, while not wrapping it's content? Padding and margins don't work.</p>
  
  <p><a href="https://i.stack.imgur.com/Z80AC.png" rel="nofollow noreferrer">Link to checkbox image</a></p>
  
  <p>Item template layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:local="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="?android:attr/listPreferredItemHeight"&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:weightSum="1"&gt;
          &lt;TextView
              style="?android:attr/spinnerDropDownItemStyle"
              android:background="@drawable/location_item_dash"
              android:foreground="#000"
              android:ellipsize="marquee"
              android:singleLine="true"
              android:textColor="#FFFFFF"
              local:MvxBind="Text LocationName"
              android:id="@+id/spinnertext"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="0.8" /&gt;
          &lt;CheckBox
              local:MvxBind="Checked Selected"
              android:background="@drawable/location_item_dash"
              android:id="@+id/spinnercheck"
              android:gravity="center"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="0.2"
              android:layout_centerHorizontal="true"
              android:layout_centerVertical="true"
              android:layout_centerInParent="true" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt; 
  </code></pre>