1

I used TextInputLayout for my EditText and showing counter

But when the keyboard appear the counter is obscure by the keyboard.

android:windowSoftInput:"adjustPan|adjustResize"

didn't work for me. Here is the XML layout content

<RelativeLayout

    android:layout_width="match_parent"
    android:layout_height="match_parent">]

    <TextInputLayout
        android:alignParentBottom="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:counterMaxLength="300"
        app:counterEnabled="true">

        <EditText 
          android:id="@+id/commentEdit"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:textSize="20sp"
          android:textColorHint="@color/blacktransperent"/>
 </TextInputLayout>

Tunaki
  • 125,519
  • 44
  • 317
  • 399
BalaramNayak
  • 1,275
  • 13
  • 15

1 Answers1

1

android:windowSoftInputMode="adjustPan|adjustResize" - add this in your manifest activity, in which activity you required

Shree Krishna
  • 8,273
  • 6
  • 36
  • 67