admin
2021-05-08 f93ff67ed4681f416a653370aa1e7995a56940ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.huawei.android.hms.agent.common;
 
import android.app.Activity;
import android.view.WindowManager;
 
/**
 * 工具类
 */
public final class UIUtils {
    /**
     * 判断当前activity是否为全屏
     * @param activity 当前activity
     * @return 是否全屏
     */
    public static boolean isActivityFullscreen(Activity activity)
    {
        WindowManager.LayoutParams attrs = activity.getWindow().getAttributes();
        if ((attrs.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == WindowManager.LayoutParams.FLAG_FULLSCREEN)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}