当前位置:网站首页>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);
}
}边栏推荐
猜你喜欢

Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'

NFTs: The Heart of Digital Ownership

vulhub靶场学习日记hackme1
![[Cloud native] Simple introduction and use of microservice Nacos](/img/06/b0594208d5b0cbf3ae8edd80ec12c4.png)
[Cloud native] Simple introduction and use of microservice Nacos

MySQL-如何分库分表?一看就懂
![[swagger close] The production environment closes the swagger method](/img/43/17be22626ba152b33beaf03f92fbec.png)
[swagger close] The production environment closes the swagger method

工件SSMwar exploded 部署工件时出错。请参阅服务器日志了解详细信息

leetcode-2321. 拼接数组的最大分数(差分+枚举)

对js的数组的理解

Why is the redis single-threaded also so fast?
随机推荐
DeFi 项目中的治理Token
flutter 混合开发 module 依赖
正则表达式基础知识
数字取证autopsy工具用法
Year-end summary - the years are quiet~
Using IIS10 to build an asp website in win11
永恒之蓝漏洞复现
powershell统计文件夹大小
计网 Packet Tracer仿真 | 简单易懂集线器和交换机对比(理论+仿真)
阿里一面,说说你知道消息中间件的应用场景有哪些?
PHP中abstract(抽象)、final(最终)和static(静态)原理与用法
Fragmented NFT (Fractional NFT)
一个简单的bash转powershell案例
How to distinguish big and small endian in C language
Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
[JVM Loading]---Class Loading Mechanism
What is GameFi?
(Crypto必备干货)详细分析目前NFT的几大交易市场
Yuan prospect and four track of the universe
数据库 | SQL查询进阶语法