TextInputLayout error alignment issue with AppCompat Spinner
<p>I am using an app which displays a drop down <code>Spinner</code> with an <code>EditText</code> as a child of <code>TextInputLayout</code> next to it.</p>

<p>When an underlined error is shown under the <code>TextInputLayout</code>, then the <code>EditText</code> will go up, and alignment will miss !! </p>

<p>See my screenshot please: </p>

<p><a href="https://i.stack.imgur.com/uNBS7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uNBS7.png" alt="enter image description here"></a></p>

<p>What I am trying to do is:</p>

<p><a href="https://i.stack.imgur.com/vtKYS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vtKYS.png" alt="enter image description here"></a></p>

<p>Here is my xml code:</p>

<pre><code>&lt;LinearLayout
    android:layout_width="@dimen/edittext_width"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:gravity="bottom"&gt;

    &lt;android.support.v7.widget.AppCompatSpinner
        android:id="@+id/spinner_countries"
        style="@style/Widget.AppCompat.Spinner.Underlined"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="30"
        android:layout_gravity="start"
        android:spinnerMode="dialog" /&gt;

    &lt;android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout_mobile"
        style="@style/TextInputLayoutTheme"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="70"&gt;

        &lt;com.cashu.app.ui.widgets.CustomEditText
            android:id="@+id/et_fragment_register_step_one_mobile"
            android:layout_width="@dimen/edittext_mobile_num_width"
            android:layout_height="wrap_content"
            android:ems="12"
            android:gravity="center_vertical"
            android:layout_gravity="start"
            android:hint="@string/mobile_hint"
            android:inputType="number"
            android:textSize="@dimen/font_size_normal" /&gt;
    &lt;/android.support.design.widget.TextInputLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Here is my <code>TextInputLayout</code> theme:</p>

<pre><code>&lt;!-- TextInputLayout Style --&gt;
&lt;style name="TextInputLayoutTheme" parent="Widget.Design.TextInputLayout"&gt;
    &lt;item name="android:gravity"&gt;center&lt;/item&gt;
    &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt;
    &lt;item name="android:textColorHint"&gt;@color/colorControlActivated&lt;/item&gt;
    &lt;item name="errorTextAppearance"&gt;@style/AppTheme.TextErrorAppearance&lt;/item&gt;
    &lt;item name="counterTextAppearance"&gt;@style/TextAppearance.Design.Counter&lt;/item&gt;
    &lt;item name="counterOverflowTextAppearance"&gt;@style/TextAppearance.Design.Counter.Overflow&lt;/item&gt;
&lt;/style&gt;
</code></pre>

<p>I tried searching for many keywords, terms and methods but unfortunately with no luck. </p>

<p>I would appreciate if anyone has a hack for this issue.</p>