Moving edit text with a soft keyboard android

I have comment editing text in the application. Editing text is aligned at the bottom of the screen. when the text editing is focused, I want to move the editing text alone using the soft keyboard, without changing other representations in the layout, similar to editing comments on facebook. I tried setting in the manifest, but it moves all views using the soft keyboard. adjustresize in the manifest hides some view.please clauses.

+4
source share
3 answers

Try to do this inside the Android manifest file.

<activity name="YourActivity" android:windowSoftInputMode="stateVisible|adjustResize"> </activity> 

or

 <activity name="YourActivity" android:windowSoftInputMode="stateVisible|adjustPan"> </activity> 

Please also read this for ref / Clarity.

+1
source

Add

Android: windowSoftInputMode = "adjustPan"

in your AndroidManifest file (in the activity property)

+1
source

dialog.getWindow(). setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);

It also works with writing a manifest file

0
source

Source: https://habr.com/ru/post/1486745/


All Articles