var Color = plus.android.importClass("android.graphics.Color");
plus.android.importClass("android.view.Window");
var mainActivity = plus.android.runtimeMainActivity();
var window_android = mainActivity.getWindow();
var WindowManager=plus.android.importClass("android.view.WindowManager");
var View=plus.android.importClass("android.view.View");
//设置为全透明
window_android.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
window_android.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
window_android.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window_android.setNavigationBarColor(Color.TRANSPARENT);
//设置为全透明结束
//window_android.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); //设置为半透明
// plus.android.invoke(window_android,"setNavigationBarColor",Color.parseColor("#000")); //为虚拟按钮添加背景色
zzhi_bo
- 发布:2021-12-10 16:05
- 更新:2024-09-14 11:09
- 阅读:4548
5 个评论
要回复文章请先登录或注册
发的王
发的王
r***@foxmail.com
导出
6***@qq.com