开发者

android keyboard press back to close

开发者 https://www.devze.com 2023-02-03 03:55 出处:网络
开发者_开发技巧do anyone know how i know when the keyboard is close? ThanksTo determine whether or not your keyboard his hidden (closed) or not, you can use one of the following approached which retu

开发者_开发技巧do anyone know how i know when the keyboard is close? Thanks


To determine whether or not your keyboard his hidden (closed) or not, you can use one of the following approached which return to you an enumerated value indicating whether or not the type of keyboard you're requesting is hidden or not.

getResources().getConfiguration().hardKeyboardHidden

or

getResources().getConfiguration().keyboardHidden

The difference is that keyboardHidden will take soft keyboards into consideration along with hard keyboards, whereas hardKeyboardHidden will only tell you whether or not the hard keyboard is hidden.

0

精彩评论

暂无评论...
验证码 换一张
取 消