Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set floating label text size?

I would like to change floating label text size in Android material EditText, when I set as follows:

<android.support.v7.widget.AppCompatEditText
    android:id="@+id/edt_current"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/str_current"
    android:inputType="number"
    android:singleLine="true"
    android:textSize="20sp" />

It just changes the text size for hint and input Text.

Since, Floating Label Text Size seems too small in my UI, I would like to change it, any solution?

like image 875
Parissa Kalaee Avatar asked Feb 15 '16 11:02

Parissa Kalaee


Video Answer


1 Answers

Try following code. This may help you:

<android.support.design.widget.TextInputLayout
        android:id="@+id/input_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:hintTextAppearance="@style/TextAppearance.AppCompat.Medium.Inverse">

You may use app:hintTextAppearance="@style/TextAppearance.AppCompat.Small.Inverse" instead.

like image 170
Mrunal Avatar answered Oct 13 '22 00:10

Mrunal