title: How to align widget.TextInputLayout with MaterialSpinner view?
body: <p>I have a specific question concerning the use of the <a href="https://android-arsenal.com/details/1/1720">MaterialSpinner</a> view.</p>
  
  <p>I want the spinner to be perfectly aligned to the right of an EditText wrapped in a android.support.design.widget.TextInputLayout view group for floating label support.</p>
  
  <p>I've tried both LinearLayout and RelativeLayout (using the align to layout attributes) and none are working properly.</p>
  
  <p>I end up with something looking like <a href="http://i.stack.imgur.com/FSVhE.png">this</a>.</p>
  
  <p>Below is my layout so far:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 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="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
  
          &lt;android.support.design.widget.TextInputLayout
              android:id="@+id/weightWidget"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"&gt;
  
              &lt;EditText
                  android:id="@+id/weight"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:ems="10"
                  android:hint="@string/weight"
                  android:inputType="number" /&gt;
          &lt;/android.support.design.widget.TextInputLayout&gt;
  
          &lt;fr.ganfra.materialspinner.MaterialSpinner
              android:id="@+id/spinner"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:entries="@array/weights_unit_array"
              app:ms_alignLabels="false"
              app:ms_arrowColor="#0000FF"
              app:ms_arrowSize="16dp"
              app:ms_floatingLabelColor="#00FF00"
              app:ms_floatingLabelText="floating label"
              app:ms_hint="@string/unit"
              app:ms_multiline="false"
              app:spinnerMode="dialog" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>In the preview of the layout designer in Android Studio, it seems that it's aligned but when I run it either on the emulator or a real device, the views are not aligned as shown in the previous screenshot.</p>