TextInputLayout floating label gravity
<p>I'm having some troubles with the TextInputLayout from the design support library on Android 4.1.</p>

<p>So, I have a simple layout with two TextInputLayout. I would like to have the hint on right because the text is in arabic.</p>

<p>I managed to put the hint on the right by using gravity="right". But I'm noticing a strange behaviour of the floating label when the EditText is focused.</p>

<p>The Floating label still stick to the left of the screen.</p>

<p>How can I have both the hint and the floating label on right ? </p>

<p>Here is my layout :</p>

<pre><code>&lt;LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.aurelien.testblablabla.MainActivity"&gt;

    &lt;android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"&gt;
        &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="end"
            android:hint="جزر"/&gt;
    &lt;/android.support.design.widget.TextInputLayout&gt;
    &lt;android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"&gt;
        &lt;EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="end"
            android:hint="تفاحة"/&gt;
    &lt;/android.support.design.widget.TextInputLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>And here is the result:</p>

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

<p>I'm using com.android.support:design:23.1.1</p>

<p>Thanks </p>