android - onBackPressed not being called when softKeyboard is visible -


i know answer has been asked multiple times there has not been legit answer solves issue. day, cannot believe google has not added listener softkeyboard. curious know if has solution listening backpress while keyboard visible? asking because within google play store when search visible , press back, hides search , keyboard @ same time. have recreated search cannot find legit answer closing custom searchview , keyboard @ same time. have tried lot of answers none of them working.

i calling "adjustpan" within manifest mainactivity prevent custom views being shifted. "adjustpan" prevents root layout making room softkeyboard, rather softkeyboard above root layout. eliminates measure solutions, have been main solution of answers.

android:windowsoftinputmode="adjustpan" 

here custom searchview

enter image description here

it google not listening onbackpressed event - rather configuration changes involve keyboard. if want hide when keyboard changes "hidden" monitor configuration onconfigurationchanged , have same effect.

see post: how capture "virtual keyboard show/hide" event in android?


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -