 <p>I figured out my problem, I set margin to my <code>AppCompatSpinner</code> and set top gravity to it with specific hight.</p> <pre><code>&lt;LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="bottom" android:orientation="horizontal"&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_marginBottom="26dp" android:layout_weight="30" 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" app:errorEnabled="true"&gt; &lt;com.cashu.app.ui.widgets.CustomEditText android:id="@+id/et_mobile" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="start" android:ems="12" android:gravity="center_vertical" 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><strong>[EDIT]</strong></p> <p>When my <code>TextInputLayout</code> has an error, I remove it by adding the following lines:</p> <pre><code>myTextInputLayout.setErrorEnabled(false); myTextInputLayout.setErrorEnabled(true); myTextInputLayout.setError(" "); </code></pre> <p>Why?</p> <ul> <li><p>This line: <code>myTextInputLayout.setErrorEnabled(false);</code> will clear the error from the <code>TextInputLayout</code></p></li> <li><p>This line: <code>myTextInputLayout.setErrorEnabled(true);</code> will enable error for the <code>TextInputLayout</code> again</p></li> <li><p>This line: <code>myTextInputLayout.setError(" ");</code> will prevent layout alignment disruption.</p></li> </ul> <p>Problem now is solved.</p>