When entering a question, find this one from similar questions.
Please add the following line to your activity in the manifest. Hope this works. android: windowSoftInputMode = "adjustPan"
More precisely, add android:windowSoftInputMode="adjustPan" to the activity tag in AndroidMenifest.xml , where the keyboard will open.
Example:
<activity android:name=".FManagerActivity" android:label="@string/app_name" android:windowSoftInputMode="adjustPan" android:theme="@style/AppTheme.Light.NoActionBar"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity>
This is basically a behavior in which activity reacts when the keyboard is open or closed. adjustPan tells the keyboard to overlay an activity that does not violate its contents. Without this, when you open the keyboard, the size of the activity changes, which leads to the disappearance of the content, since notifyDatasetChanged() not called during and after implicit actions.
source share