当前位置:网站首页>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);
}
}边栏推荐
- 阿里一面,说说你知道消息中间件的应用场景有哪些?
- Xiaobai learns reptiles - introduction to reptiles
- npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
- js中的对象与函数的理解
- leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
- 年终总结——岁月静好~
- 2021面经-拥抱变化
- 【swagger关闭】生产环境关闭swagger方法
- How to distinguish big and small endian in C language
- [windows]--- SQL Server 2008 super detailed installation tutorial
猜你喜欢

一文速学-玩转MySQL获取时间、格式转换各类操作方法详解

常见JVM面试题及答案整理
![[Cloud native] Open source data analysis SPL easily copes with T+0](/img/89/4a96358956782ef9dacf0b700b54c3.png)
[Cloud native] Open source data analysis SPL easily copes with T+0

js中的对象与函数的理解

【swagger关闭】生产环境关闭swagger方法

【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了

The server time zone value ‘й‘ is unrecognized or represents more than one time zone

leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)

MySQL高级学习笔记

UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
随机推荐
js中流程控制语句
leetcode-每日一题735. 行星碰撞(栈模拟)
leetcode-每日一题1217. 玩筹码(贪心+位运算)
对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
[swagger close] The production environment closes the swagger method
Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
C language tutorial (2) - printf and data types that come with c
How to distinguish big and small endian in C language
cocos2d-x-3.2 Physics
小白学爬虫——爬虫入门
MySQL压缩包方式安装,傻瓜式教学
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
(Crypto必备干货)详细分析目前NFT的几大交易市场
【Elastic-Job源码分析】——作业监听器
leetcode-1833. 雪糕的最大数量(排序+贪心)
First acquaintance with Flask
Linux modify MySQL database password
利用phpstudy搭建DVWA
Redis:简单实用
Memcached :安装