Android: display the contents of a list of hidden keys

like in this post: Keyboard hides ListView content

I cannot see the contents of my first few rows of my ListView when the keyboard is visible.

Since my first problem was to have my element down, I follow these tips: Android: showing the keyboard moves my components up, I want to hide them.

but

android:windowSoftInputMode="adjustPan" 

created another problem, my list doesn't resize when my keyboard gets up and I don't see my first few lines

thanks

+6
source share
1 answer

I had the same problem and solved it using the code below.

in your activity:

 mylistview.setTranscriptMode(ListView.TRANSCRIPT_MODE_NORMAL); mylistview.setStackFromBottom(true); 

or in xml file for

 android:stackFromBottom="true" android:transcriptMode="normal" 

and saving adjustResize for activity in the manifest file.

 <activity .... android:windowSoftInputMode="stateHidden|adjustResize" ..../> 

Source: Click Listview when keyboard appears without setting Pan

+4
source

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


All Articles