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
  • 132,869
  • 46
  • 340
  • 423
BalaramNayak
  • 1,295
  • 13
  • 16

1 Answers1

1

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

Shree Krishna
  • 8,474
  • 6
  • 40
  • 68