VIEw decorVIEw = getwindow().getDecorVIEw();decorVIEw.setonsystemUIVisibilitychangelistener (new VIEw.OnsystemUIVisibilitychangelistener() { @OverrIDe public voID onsystemUIVisibilityChange(int visibility) { // Note that system bars will only be "visible" if none of the // LOW_PROfile,HIDE_NAVIGATION,or FulLSCREEN flags are set. if ((visibility & VIEw.SYstem_UI_FLAG_FulLSCREEN) == 0) { // Todo: The system bars are visible. Make any desired // adjustments to your UI,such as showing the action bar or // other navigational controls. } else { // Todo: The system bars are NOT visible. Make any desired // adjustments to your UI,such as hIDing the action bar or // other navigational controls. } }
});
这是直接从文档:
https://developer.android.com/training/system-ui/visibility.html
以上是内存溢出为你收集整理的Android多窗口支持:检测状态栏是否可见?全部内容,希望文章能够帮你解决Android多窗口支持:检测状态栏是否可见?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)