3

I'm dynamically adding views (RelativeLayout with EditText) into FrameLayout and setting their positions using setTranslate methods. But on screen keyboard overlaps on my EditText.

I've tried to set

android:windowSoftInputMode="stateHidden|adjustResize|adjustPan"

in manifest, but there is still no result. I'm using 11 SDK.

How to solve that problem?

Here is screeshots:

enter image description here enter image description here

Dmitry Zaytsev
  • 23,650
  • 14
  • 92
  • 146

4 Answers4

2

As you have already tried activity android:windowSoftInputMode in your Manifest. You can do it by chaging the Layout to relative and make your EditText android:layout_alignParentBottom="true"

Refer this Example

Community
  • 1
  • 1
Som
  • 1,514
  • 14
  • 21
2

Surround your Relative layout with a <ScrollView>.

PrincessLeiha
  • 3,144
  • 4
  • 32
  • 53
1

Place your view inside of this. ScrollView only accepts one child though, so you may need to add all of your components to a LinearLayout, then add the LinearLayout inside of the ScrollView.

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


</ScrollView>

If that's not what you're looking for then add

android:layout_alignParentBottom="true"
Pjrat111
  • 213
  • 1
  • 3
  • 9
0

The only thing that worked for me was putting an update in the manifest file within that specific activity tag which is hosting the fragment whose layout is creating the issue in scrolling. The solution is given by:

android:windowSoftInputMode="stateVisible|adjustPan"
Ali Nawaz
  • 2,016
  • 20
  • 30