当前位置:网站首页>WindowInsetsControllerCompat is simple to use
WindowInsetsControllerCompat is simple to use
2022-08-01 00:02:00 【Dongdongxu huster】
WindowInsetsControllerCompat, which can be mainly used to control the display of navigation bar, status bar, keyboard, etc. in the interface. There are probably the following types.
WindowInsetsCompat.Type.statusBars()WindowInsetsCompat.Type.navigationBars()WindowInsetsCompat.Type.captionBar()WindowInsetsCompat.Type.ime()WindowInsetsCompat.Type.systemGestures()WindowInsetsCompat.Type.mandatorySystemGestures()WindowInsetsCompat.Type.tappableElement()WindowInsetsCompat.Type.displayCutout()WindowInsetsCompat.Type.systemBars()Import dependencies
implementation 'androidx.core:core:1.5.0-beta03'
How to use
WindowInsetsControllerCompat insetsController = ViewCompat.getWindowInsetsController(getWindow().getDecorView());// Hide the status bar, navigation bar, title barinsetsController.hide(WindowInsetsCompat.Type.systemBars());// Display the status bar, navigation bar, title barinsetsController.show(WindowInsetsCompat.Type.systemBars());// hide the navigation barinsetsController.hide(WindowInsetsCompat.Type.navigationBars());// show the navigation barinsetsController.show(WindowInsetsCompat.Type.navigationBars());// show the status barinsetsController.show(WindowInsetsCompat.Type.statusBars());// hide the status barinsetsController.hide(WindowInsetsCompat.Type.statusBars());// show the keyboardinsetsController.show(WindowInsetsCompat.Type.ime());// hide the keyboardinsetsController.hide(WindowInsetsCompat.Type.ime());// ...// Control the font color of the status bar to display whiteinsetsController.setAppearanceLightStatusBars(false);// Control the navigation bar font to be displayed in blackinsetsController.setAppearanceLightStatusBars(true);// Navigation bar color is whiteinsetsController.setAppearanceLightNavigationBars(false);// The navigation bar is displayed in blackinsetsController.setAppearanceLightNavigationBars(true);边栏推荐
猜你喜欢
随机推荐
周总结
IPD process terminology
Matlab / ArcGIS 处理GPM全球月均降水数据
Interview Blitz 69: Is TCP Reliable?Why?
清华大学陈建宇教授团队 | 基于接触丰富机器人操作的接触安全强化学习框架
[QNX Hypervisor 2.2用户手册]9.15 suppress
消息队列消息存储设计(架构实战营 模块八作业)
一文带你了解 Grafana 最新开源项目 Mimir 的前世今生
Interview Question: Implementing Deadlocks
如何导入 Golang 外部包并使用它?
Advanced Algebra _ Proof _ Any matrix is similar to an upper triangular matrix
SQL注入 Less54(限制次数的SQL注入+union注入)
推荐系统:常用评价指标总结【准确率、精确率、召回率、命中率、(归一化折损累计增益)NDCG、平均倒数排名(MRR)、ROC曲线、AUC(ROC曲线下的面积)、P-R曲线、A/B测试】
南方科技大学:Xiaoying Tang | AADG:视网膜图像分割领域泛化的自动增强
基于simulink的Active anti-islanding-AFD主动反孤岛模型仿真
C# Rectangle基本用法和图片切割
TFC CTF 2022 WEB Diamand WriteUp
2022-07-31:给出一个有n个点,m条有向边的图, 你可以施展魔法,把有向边,变成无向边, 比如A到B的有向边,权重为7。施展魔法之后,A和B通过该边到达彼此的代价都是7。 求,允许施展一次魔法
网易云信圈组上线实时互动频道,「破冰」弱关系社交
Pylint检查规则中文版
![[MATLAB project combat] LDPC-BP channel coding](/img/37/4777e4d05cb2dbb1865f1d05ae9878.png)








