Skip to content Skip to sidebar Skip to footer

Textinputlayout & Textinputedittext Hint

This is my xml code to make a input text for user phone number but when it unfocused the hint label showed with larger text size my question is how to make the hint label activate

Solution 1:

Your hint is in the wrong place

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/phone_number"
    android:textColorHint="@color/colorText">

    <android.support.design.widget.TextInputEditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:maxLines="1"
        android:textColorHint="@color/colorText" />

</android.support.design.widget.TextInputLayout>

Post a Comment for "Textinputlayout & Textinputedittext Hint"