I have an activity that contains 2 fragments, FacebookFragmentand GoogleFragment.
Now that the activity has started, it starts FacebookFragment. When the user presses the button on FacebookFragment, the activity shows GoogleFragmentwhich will be added to the container, but GoogleFragmenthas transparency so that the user can see the contents FacebookFragment.
In the second snippet GoogleFragment, I have EditTextone that is at the bottom of the view, and when the keyboard appears, I want it to EditTextbe displayed above keyboard.
But, on the other hand, I want that when the keyboard appears, the view in FacebookFragmentto remains as it is, and should not be scrolled or changed from the keyboard.
What I have tried so far is that for the activity that I added in the manifest:
android:windowSoftInputMode="stateHidden|adjustNothing"
and on FacebookFragment I added:
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
in GoogleFragment I added:
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
But this does not work for me, but I had to try this.
I tried several answers that I found here in stackoverflow, but I did not find the right solution.
Any solution is welcome! Thanks
PS: the activity has one container FrameLayout, and both fragments are added to the same container.