当前位置:网站首页>Code ~ hide or disable the status bar and virtual keys
Code ~ hide or disable the status bar and virtual keys
2022-07-29 03:40:00 【Nanke is cute】
themes.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.NavigationBarSample" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <!-- Primary brand color. --> <item name="colorPrimary">@color/purple_500</item> <item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorOnPrimary">@color/white</item> <!-- Secondary brand color. --> <item name="colorSecondary">@color/teal_200</item> <item name="colorSecondaryVariant">@color/teal_700</item> <item name="colorOnSecondary">@color/black</item> <!-- Status bar color. --> <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> <!-- Customize your theme here. --> <item name="android:windowFullscreen">true</item> <item name="windowNoTitle">true</item> <item name="windowActionBar">false</item> <item name="android:navigationBarColor">#88000000</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> </style>
</resources>
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_main);
}
}
Reference resources :
https://www.jcodecraeer.com/a/anzhuokaifa/developer/2014/1117/1997.html
边栏推荐
- Rdkit I: using rdkit to screen the structural characteristics of chemical small molecules
- Kubernetes-1.24.x feature
- (nowcoder22529c) diner (inclusion exclusion principle + permutation and combination)
- 力扣每日一题-第44天-205. 同构字符串
- Learn exkmp again (exkmp template)
- Why do many programmers hate pair programming?
- Matlab learning -- structured programs and user-defined functions
- In depth C language (2) -- definition and use of structure
- Multi level wavelet CNN for image restoration
- Web uploader cannot upload multiple files
猜你喜欢

Sunflower senior product director technology sharing: "how to apply national remote control" in AD domain environment

NXP i.mx8mp-deepviewrt

exness:鸽派决议帮助黄金反弹,焦点转向美国GDP

Deep into C language (3) -- input and output stream of C

容斥原理

向日葵资深产品总监技术分享:“国民远控”如何在AD域环境下应用

深入C语言(1)——操作符与表达式

AI_ Drug: VAE of molecular generation model (I)
![MOS tube - rapid recovery application notes (II) [parameters and applications]](/img/54/eb040a51304192def8cfb360c7c213.png)
MOS tube - rapid recovery application notes (II) [parameters and applications]

Rdkit II: use rdkit screening to screen 2D pharmacophores of chemical small molecules
随机推荐
Install the packet capturing certificate
Introduction to static routing and dynamic routing protocols OSPF and rip and static routing configuration commands
Notes on letter symbol marking of papers
2 neural network toolbox NN
1. 头文件-注释-命名空间-标准输入输出流
Singleton and invariant modes of concurrent mode
Flutter 启动白屏
04 | background login: login method based on account and password (Part 1)
Rongyun real-time community solution
for_ Example of each usage
How to judge stun protocol
Why do many programmers hate pair programming?
Complexity analysis learning
Simple code implementation of decision tree
3.1 common neural network layer (I) image correlation layer
(2022 Hangdian multi school III) 1002 boss rush (pressure dp+ dichotomy)
three.js 第五十四用如何给shader传递结构体数组
Producer consumer model of concurrent model
three. JS Part 54 how to pass structure array to shader
Rdkit I: using rdkit to screen the structural characteristics of chemical small molecules