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
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
Post a Comment