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);
logo在线生成器
2024-10-23 广告
2024-10-23 广告
燕雀零一专业logo生成器,是一家科技型的设计公司,团队深耕企业品牌设计服务已有十余年,已助力多家企业塑造其品牌形象及体验,服务内容含:LOGO设计/VI设计/产品包装设计/导视店面门头及空间设计,吉祥物设计/海报设计等。 我们的目标是帮助...
点击进入详情页
本回答由logo在线生成器提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询