Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can display my scroll layout above the keyboard?

Am using a scrollview inside a relative layout.

I could be able to scroll to end of the page in all mobiles when without keyboard, in some mobiles i could be able to view scroll layout completely when the keyboard is on. ie)- the end of the scrollview above the keyboard.

The problem i have analysed is because of type of keyboard varies in different android devices.

Got some answers to add windowSoftInputMode in activity manifest.

Also added: android:windowSoftInputMode="stateHidden|adjustResize"

But still am getting the same problem. If you have solution or have faced the problem, share your ideas. Thanks for your time.

like image 953
arnp Avatar asked Aug 30 '12 07:08

arnp


1 Answers

I came across this question looking into a similar problem. android:windowSoftInputMode="adjustResize" works sometimes, not other times. Why not?

This answer talks about an Android fullscreen theme. Honeycomb (3.1) adjustResize no longer working?

For me the problem was this call here: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

Setting the flags to fullscreen would prevent proper scrolling when the keyboard appeared.

like image 161
jriggs Avatar answered Oct 22 '22 16:10

jriggs