Layout Is Not Floating Above Keyboard In Fragment In Android
I have a layout which has two edit texts and horizontal scroll bar with some icons in a fragment. The horizontal scroll view is permanently fixed to the bottom of the parent using
Solution 1:
Try this in fragment call on each onCreateView
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
Solution 2:
You need to add a line in the manifest to adjust the screen visibility in an Activity.
android:windowSoftInputMode="stateVisible|adjustPan"
So the activity tag in Manifest would be like this:
<activityandroid:name=".MainActivity"android:windowSoftInputMode="stateVisible|adjustPan"android:label="@string/app_name" ><intent-filter><actionandroid:name="android.intent.action.MAIN" /><categoryandroid:name="android.intent.category.LAUNCHER" /></intent-filter></activity>
Post a Comment for "Layout Is Not Floating Above Keyboard In Fragment In Android"