当前位置:网站首页>cocoscreator 显示刘海内容
cocoscreator 显示刘海内容
2022-07-31 05:15:00 【xuyid】
修改libcocos2dx的Utils文件
注释掉SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN和SYSTEM_UI_FLAG_FULLSCREEN
public static void hideVirtualButton() {
if (Build.VERSION.SDK_INT >= 19 &&
null != Utils.sActivity) {
// use reflection to remove dependence of API level
Class viewClass = View.class;
final int SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION");
final int SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN");
final int SYSTEM_UI_FLAG_HIDE_NAVIGATION = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_HIDE_NAVIGATION");
final int SYSTEM_UI_FLAG_FULLSCREEN = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_FULLSCREEN");
final int SYSTEM_UI_FLAG_IMMERSIVE_STICKY = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_IMMERSIVE_STICKY");
final int SYSTEM_UI_FLAG_LAYOUT_STABLE = Cocos2dxReflectionHelper.<Integer>getConstantValue(viewClass, "SYSTEM_UI_FLAG_LAYOUT_STABLE");
// getWindow().getDecorView().setSystemUiVisibility();
final Object[] parameters = new Object[]{SYSTEM_UI_FLAG_LAYOUT_STABLE
| SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
// | SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
| SYSTEM_UI_FLAG_IMMERSIVE_STICKY};
Cocos2dxReflectionHelper.<Void>invokeInstanceMethod(Utils.sActivity.getWindow().getDecorView(),
"setSystemUiVisibility",
new Class[]{Integer.TYPE},
parameters);
}
}边栏推荐
- 什么是EVM兼容链?
- 【Elastic-Job】分布式调度任务概览篇
- On the side of Ali, tell me what are the application scenarios of message middleware you know?
- cocos2d-x-3.2 Physics
- leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
- MySql创建数据表
- 小白学爬虫——爬虫入门
- sqlmap injection tutorial common commands
- js中的this指向与原型对象
- Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
猜你喜欢

Digital twins will be an important way to enter the "metaverse"

Android软件安全与逆向分析阅读笔记

win11中利用IIS10搭建asp网站

UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装

js中的对象与函数的理解

对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
![[windows]--- SQL Server 2008 super detailed installation tutorial](/img/b7/dc802c63b07edc4298b6e6b90d865c.png)
[windows]--- SQL Server 2008 super detailed installation tutorial

How MySQL - depots table?A look at will understand
![[Elastic-Job source code analysis] - job listener](/img/99/5e047b1aa83aad7d7f17b4eec606e6.png)
[Elastic-Job source code analysis] - job listener

js中的全局作用域与函数作用域
随机推荐
【windows】--- SQL Server 2008 超详细安装教程
了解SSRF,这一篇就足够了
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
sqlmap injection tutorial common commands
File operations in C language (1)
leetcode-每日一题1217. 玩筹码(贪心+位运算)
什么是EVM兼容链?
js中的this指向与原型对象
2021 Mianjing - Embrace Change
Object,多态 1(第八天)
常见JVM面试题及答案整理
vulhub靶场学习日记hackme1
First acquaintance with Flask
powershell统计文件夹大小
纯shell实现文本替换
Linux中mysql密码修改方法(亲测可用)
mysql启动报错The server quit without updating PID file几种解决办法
leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
【JVM加载】---类加载机制
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了