获取虚拟键盘的Android的高度 [英] Get the height of virtual keyboard in Android
本文介绍了获取虚拟键盘的Android的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎样才能获得虚拟键盘的Android的高度?这可能吗?
How can I get the height of virtual keyboard in Android? Is it possible?
我尝试从主窗口中得到它,但它给我的应用程序的最大高度。但我想要得到的键盘高度。
I try to get it from the main window, but it gives me full height of the application. But I want to get the keyboard height.
推荐答案
您无法获得键盘高度,但你可以得到你的视图,这是你真正想要的高度 - 你会得到这个数据供给到onLayout调用到当前视图。
You can't get the keyboard height, but you can get the height of your View, which is what you really want - and you'll get this data supplied to the onLayout call into the current view.
这篇关于获取虚拟键盘的Android的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文