Ekta Shukla
Ekta Shukla

Reputation: 480

How To adjust background when keyboard hide?

I am making android phonegap application.In my application after typing on textbox when i am hiding keyboard background screen is taking time to adjust.As i am hiding keyboard whiite area shows in background and it take few seconds to adjust background image.Which is not giving native application look and feel.Can anyone help me to remove this white area and adjust screen automatically ad keyboard hide?Please help me..

Thanks in advance!!

Upvotes: 0

Views: 1684

Answers (1)

Manish Parakhiya
Manish Parakhiya

Reputation: 3798

I had same problem when keyboard hide it shows white area behind it and slowly disappear. i solved this problem by setting SoftInputMode property of activity to ADJUST_PAN.

you can set it in java class by following code

 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);

Hope this helps.

Upvotes: 3

Related Questions