Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Showing keyboard hides listview contents

like in this post : Keyboard hides ListView contents

I can't See Contents of my first few rows of my ListView when Keyboard is Visible.

Because my first probleme was to have my element in the bottom so i've follow this tips : Android : Showing keyboard moves my components up, i want to hide them instead

but

android:windowSoftInputMode="adjustPan"

created another issue, my listview is not resize when my keyboard is up and i can't see my first few rows

Thanks

like image 781
IgnitedRaven Avatar asked Jul 22 '13 14:07

IgnitedRaven


1 Answers

I had the same issue and solved this with the below code.

in your activity:

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

or in xml file for

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

and keeping the adjustResize for activity in manifest file.

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

Source: Push Listview when keyboard appears without adjustPan

like image 113
Noundla Sandeep Avatar answered Oct 07 '22 06:10

Noundla Sandeep