When the keyboard is hidden the space is not rendered

Asked

Viewed 52 times

1

I have a problem in one of the Activitys, in this Activity I have a lot of content, so I’m using a Scrollview. The problem is that once I finish typing in Edittext and the keyboard is hidden the space that the keyboard was occupying turns white, it does not return to display the content of Activity. This happens only the first time I type in the first Edittext screen. I’m testing the app on Android 4.2. I tested the application on a mobile with Android 7.0 and the error did not occur.

Below the screen print:

Print do erro

The Edittext XML is this:

<EditText
  android:id="@+id/cad_perguntas_edt_enunciado"
  android:layout_width="0dp"
  android:layout_height="wrap_content"
  android:layout_marginLeft="0dp"
  android:layout_marginRight="0dp"
  android:layout_marginTop="0dp"
  android:ems="10"
  android:hint="@string/cad_perg_enun_hint"
  android:inputType="textMultiLine|textCapSentences|textAutoCorrect"
  android:theme="@style/EditTextPadrao"
  app:layout_constraintHorizontal_bias="0.0"            
  app:layout_constraintLeft_toLeftOf="@+id/cad_perguntas_txt_enunciado"
  app:layout_constraintRight_toRightOf="@+id/cad_perguntas_txt_enunciado" 
  app:layout_constraintTop_toBottomOf="@+id/cad_perguntas_txt_enunciado" />

Does anyone have any idea what’s going on?

1 answer

1


Puts Scrowview inside a relative layout, SV puts:

android:layout_height="wrap_content"
android:layout_centerVertical="true"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.