private void toggleFullscreen() { WindowManager.LayoutParams attrs = getWindow().getAttributes(); if ((attrs.flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == WindowManager.LayoutParams.FLAG_FULLSCREEN) { attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN; } else { attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; } getWindow().setAttributes(attrs); }
沒有留言:
張貼留言