I use ViewPager also inside the first fragment of ViewPager. I have another snippet that brings up an extra ScrollView snippet in it. to make it more visual:
┌------------┐ | 1 | 1 is the ViewPager fragment | ┌---------┐| | | 2 || 2 is the fragment inside ViewPager fragment | |┌-------┐|| | ||3 ||| 3 is the sub fragment containing the ScrollView with EditText form | ||form ||| | ||here ||| | || ||| | |└-------┘|| | └---------┘| └------------┘
Problem:
when I use adjustResize , it allows ScrolView fragment 3 to ScrolView to the end, but when the screen is too small, the ScrollView hides behind the SoftKeyboard and does not push the parent fragments until fragment 3 is displayed.
when I use adjustPan on small screens, it pushes the parent fragments and allows me to see "fragment 3", but when I scroll, some of the ScrollView are hidden behind the soft keyboard.
I read in SO and android docs. they all indicate the use of adjustResize with ScrollView . but in my case I need to push the parent fragments to small screens, otherwise the ScrollView in fragment3 will be covered by SoftKeyboard .
Is it possible to execute adjustPan in the parent fragment and configure the Resize parameter for the child fragment with scrollview at the same time? if there are no workarounds?
Your advice is welcome!
source share