android 4.0中如何去掉全局的虚拟导航栏
1个回答
2016-06-01 · 百度知道合伙人官方认证企业
兄弟连教育
兄弟连教育成立于2006年,11年来专注IT职业教育,是国内专业的IT技术培训学校。2016年成功挂牌新三板(股票代码:839467)市值过亿。开设专注程序员培训专注php、Java、UI、云计算、Python、HTML5、
向TA提问
关注
展开全部
在android\frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\tablet\
下的TabletStatusBar.java的 addStatusBarWindow() 函数中
WindowManagerImpl.getDefault().addView(sb, lp); 这句话是就是在把sb 加入到window中
屏蔽掉这句就行了
或者WindowManagerImpl.getDefault().removeView(sb); 也可以移除 其中sb就是 SystemUI的
View , addStatusBarWindow()全部代码如下:
final View sb = makeStatusBarView();
Log.w("____________" , "addStatusBarWindow");
final WindowManager.LayoutParams lp = new
WindowManager.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_NAVIGATION_BAR,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
|
WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
// We use a
pixel format of RGB565 for the status bar to save memory bandwidth
and
// to ensure that the layer can be handled by
HWComposer. On some devices the
// HWComposer is unable to
handle SW-rendered RGBX_8888 layers.
PixelFormat.RGB_565);
// We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags.
The status bar occupies
// very little screen real-estate and is
updated fairly frequently. By using CPU rendering
// for the status
bar, we prevent the GPU from having to wake up just to do these small
// updates, which should help keep power consumption down.
// lp.gravity = getStatusBarGravity();
lp.setTitle("SystemBar");
lp.packageName =
mContext.getPackageName();
WindowManagerImpl.getDefault().addView(sb,
lp);
// Log.w("______________" ,
"removeView(sb)");
// WindowManagerImpl.getDefault().removeView(sb);
下的TabletStatusBar.java的 addStatusBarWindow() 函数中
WindowManagerImpl.getDefault().addView(sb, lp); 这句话是就是在把sb 加入到window中
屏蔽掉这句就行了
或者WindowManagerImpl.getDefault().removeView(sb); 也可以移除 其中sb就是 SystemUI的
View , addStatusBarWindow()全部代码如下:
final View sb = makeStatusBarView();
Log.w("____________" , "addStatusBarWindow");
final WindowManager.LayoutParams lp = new
WindowManager.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_NAVIGATION_BAR,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
|
WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
// We use a
pixel format of RGB565 for the status bar to save memory bandwidth
and
// to ensure that the layer can be handled by
HWComposer. On some devices the
// HWComposer is unable to
handle SW-rendered RGBX_8888 layers.
PixelFormat.RGB_565);
// We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags.
The status bar occupies
// very little screen real-estate and is
updated fairly frequently. By using CPU rendering
// for the status
bar, we prevent the GPU from having to wake up just to do these small
// updates, which should help keep power consumption down.
// lp.gravity = getStatusBarGravity();
lp.setTitle("SystemBar");
lp.packageName =
mContext.getPackageName();
WindowManagerImpl.getDefault().addView(sb,
lp);
// Log.w("______________" ,
"removeView(sb)");
// WindowManagerImpl.getDefault().removeView(sb);
微测检测5.10
2023-05-10 广告
2023-05-10 广告
您好!建议咨 深圳市微测检测有限公司,已建立起十余个专业实验室,企业通过微测检测就可以获得一站式的测试与认 证解决方案;(EMC、RF、MFi、BQB、QI、USB、安全、锂电池、快充、汽车电子EMC、汽车手机互 联、语音通话质量),认证遇...
点击进入详情页
本回答由微测检测5.10提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询