When the keyboard is hidden space is not rendered

1

I have a problem with one of the Activities, in this Activity I have a lot of content, so I'm using a ScrollView. The problem is that as soon as I finish typing in EditText and the keyboard is hidden the space that the keyboard was occupying becomes white, it does not return to display the contents of the Activity. This happens only the first time I type in the first EditText of the screen. I am testing the application on Android 4.2. I tested the application on an Android 7.0 mobile phone and the error did not occur.

Below the screen print:

TheEditTextXMListhis:

<EditTextandroid: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 an idea what's going on?

    
asked by anonymous 17.09.2017 / 00:13

1 answer

1

Put the ScrowView into a relative layout, in the SV places:

android:layout_height="wrap_content"
android:layout_centerVertical="true"
    
17.09.2017 / 00:19