colymore
colymore

Reputation: 12316

Move layout when edittext show keyboard in fragment

I have a fragment with a EditText and when I show the keyboard for write the EditText doesn't show completely.

I have this in the fragment but doesnt work:

getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

Any idea?

enter image description here

Upvotes: 2

Views: 1471

Answers (2)

Lal
Lal

Reputation: 14810

Just add

android:windowSoftInputMode="adjustPan"

in your AndroidManifest.xml

and you can see more about the parameters here

Upvotes: 3

marcel
marcel

Reputation: 313

You can Use a scrollview it scrolls up so the screen

Upvotes: -2

Related Questions