How to check visibility of software keyboard in Android?

前端 未结 30 5056
半阙折子戏
半阙折子戏 2020-11-21 04:43

I need to do a very simple thing - find out if the software keyboard is shown. Is this possible in Android?

30条回答
  •  半阙折子戏
    2020-11-21 05:18

    Don't make any hard code. Best way is you have to resize your views while on Get Focus on EditText with KeyBord Show. You can do this adding resize property on activity into Manifest file using below code.

    android:windowSoftInputMode="adjustResize"

提交回复
热议问题