0

Premise: I have a fragment located within a frame layout in the activity layout. The application is in full screen mode.

How fragment looks like

Problem: When the keyboard lifts up, it hides some edit text, even the one that currently has the focus.

Problem

Actions already taken: I have already tried setting the flags in the manifest:

android:windowSoftInputMode="adjustPan"  
// OR
android:windowSoftInputMode="adjustResize"
// OR ...

but nothing worked. I also tried setting the flag in the fragment's onCreateView (I also tried in onCreate), but without success.

...
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
...

Question: What could be the problem? What am I doing wrong?

sysken
  • 11
  • 1
  • 4
  • check this thread https://stackoverflow.com/questions/21092888/windowsoftinputmode-adjustresize-not-working-with-translucent-action-navbar and this one https://stackoverflow.com/questions/7417123/android-how-to-adjust-layout-in-full-screen-mode-when-softkeyboard-is-visible – Rainmaker Apr 21 '20 at 14:55
  • @Rainmaker thanks for the reply but i've but I also tried these things. The end result was that everything behind the fragment is resized but the views of the fragment do not. – sysken Apr 21 '20 at 15:18
  • do you try to put fragment in scrollview – ahmed shaaban Apr 22 '20 at 09:40
  • @ahmedshaaban Yes, I tried but nothing or better to say it's not the result I'm looking for – sysken Apr 22 '20 at 18:16

2 Answers2

0

Try using scrollview for parent to your form.

0

I have found the solution to the problem: i was using com.google.android.material:material:1.2.0-alpha02 apparently it seems to have problems with the auto-adjustment of the screen. Changing with com.google.android.material:material:1.2.0-alpha06 it worked properly.

sysken
  • 11
  • 1
  • 4