Android 判断Activity是否可见

Published on with 1,044 views

if (activity.getWindow().getDecorView().getVisibility() == View.VISIBLE) {
    //Activity 可见
}else {
    //Activity 不可见
}



标题:Android 判断Activity是否可见
作者:yanjing
地址:https://blog.yanjingtp.cn/articles/2023/04/23/1682237498480.html