我正在 Android 上编写一个阅读应用程序。要分隔页面上的文本,我必须获得应用程序屏幕的高度,没有状态栏。如何做到这一点?
最佳答案
试试这个
int width=getWindow().getWindowManager().getDefaultDisplay().getWidth();
int height=getWindow().getWindowManager().getDefaultDisplay().getHeight();
给出屏幕宽度和高度。
关于android - 如何在Android上获取屏幕工作区的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8624580/