微信漂流瓶点击屏幕任何地方 title隐藏||显示代码
时间:2015-01-06 18:01:24
收藏:0
阅读:553
点击前....
点击后...
实现代码:
private void full(boolean enable) { if (enable) { WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; getWindow().setAttributes(lp); getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } else { WindowManager.LayoutParams attr = getWindow().getAttributes(); attr.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().setAttributes(attr); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); } }
评论(0)