How do I detect if software keyboard is visible on Android Device or not?

前端 未结 30 2081
情书的邮戳
情书的邮戳 2020-11-22 10:59

Is there a way in Android to detect if the software (a.k.a. \"soft\") keyboard is visible on screen?

30条回答
  •  再見小時候
    2020-11-22 11:37

    You can use the callback result of showSoftInput() and hideSoftInput() to check for the status of the keyboard. Full details and example code at

    http://www.ninthavenue.com.au/how-to-check-if-the-software-keyboard-is-shown-in-android

提交回复
热议问题