I have an Activity with three Fragment and they are controlled by Tabs at the bottom.
One of the fragments needs the keyboard and so I would like to resize the fragment recycler view when the keyboard is visible, so that the last item in the recycler view is visible above the keyboard (after scrolling).
But if in the AndroidManifest.xml, I specify
android:windowSoftInputMode="adjustResize"
or
android:windowSoftInputMode="adjustPan"
The bottom tabs also become visible above the keyboard.
I even tried to use OnGlobalLayoutListener to check when the keyboard is visible and then adjust height of the recycler view accordingly. But this also does not work, since, OnGlobalLayoutListener is called only when
android:windowSoftInputMode="adjustPan"
or android:windowSoftInputMode="adjustResize"
are used, which defeats the purpose in this case.
Is there any way such that the view of the Fragment is resized/adjusted but not the activity view (bottom tabs)?
Thanks
So this is how I solved it.
The keyboard changes are received in
OnGlobalLayoutListener
whenAnd it also does not push the bottom tabs above the keyboard.
Thus, it solves the issue at hand.
Thanks