实现全屏函数:
private void setFullScreen(){
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
退出全屏函数:
private void quitFullScreen(){
final WindowManager.LayoutParams attrs = getWindow().getAttributes();
attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setAttributes(attrs);
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}
posted on 2012-03-17 23:47
小果子 阅读(143)
评论(0) 编辑 收藏 引用 所属分类:
Android & Ios