Search code examples
androidkotlinandroid-textinputedittext

TextInputEditText resizing text


I have this TextInputEditText widget (Material Design)

when there is too much text on the field, it gets cut off. I want to resize it until a certain size


Solution

  • There is a library for this which supports min/max size: AutoFitEditText


    P.S. Probably you know, but, if anyone ended up here wondering about auto resize textviews they need something like this:

    <TextView
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:autoSizeTextType="uniform"
        android:autoSizeMinTextSize="12sp"
        android:autoSizeMaxTextSize="100sp"
        android:autoSizeStepGranularity="2sp" />
    

    From:Autosizing TextViews