Skip to content Skip to sidebar Skip to footer

Android:windowSoftInputMode="adjustResize" When I've Already Have ScrollView In The Activity

I have an activity with this Layouts structure: LinearLayout -> ScrollView -> TableLayout Below the TableLayout i have EditText, which I want to be scrolled up when the keyb

Solution 1:

I was facing the same problem where the virtual keyboard was hiding EditTexts on my screen. I introduced the following property for activity tag in the manifest file:

 android:windowSoftInputMode="stateVisible|adjustResize|adjustPan"

Also I needed to add following code in the activity's OnCreate function:

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);

This solved the problem and it worked perfectly fine on all resolution emulators and samsung devices. It did fail, though, on Google Nexus S device and I could see the same problem again of virtual keyboard hiding the EditTexts.


Post a Comment for "Android:windowSoftInputMode="adjustResize" When I've Already Have ScrollView In The Activity"