The keyboard overlaps in EditText when I dynamically add a view

I dynamically add views ( RelativeLayoutc EditText) to FrameLayoutand set their positions using methods setTranslate. But on-screen keyboard overlap mine EditText.

I tried to install

android:windowSoftInputMode="stateHidden|adjustResize|adjustPan"

in the manifest, but still no result. I use 11 SDKs.

How to solve this problem?

Here are the screenshots:

enter image description hereenter image description here

+3
source share
3 answers

As you have already tried android: windowSoftInputMode in your manifest. You can do this by associating the layout with relative and make your EditText android: layout_alignParentBottom = "true"

Refer to Example

+2
source

<ScrollView>.

+2

Put your view inside of it. ScrollView only accepts one child, so you may need to add all of your components to LinearLayout and then add LinearLayout inside ScrollView.

<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">  


</ScrollView>

If this is not what you are looking for, add

android:layout_alignParentBottom="true"
+1
source

All Articles