Created
January 29, 2020 04:45
-
-
Save m4kvn/1a1d8f045eb79d0710b1c953ec43376b to your computer and use it in GitHub Desktop.
画面をフルスクリーンにするExtension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun FragmentActivity.fullscreen(flag: Boolean) { | |
| val attrs = window.attributes | |
| attrs.flags = if (flag) | |
| attrs.flags or WindowManager.LayoutParams.FLAG_FULLSCREEN else | |
| attrs.flags or WindowManager.LayoutParams.FLAG_FULLSCREEN | |
| window.attributes = attrs | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment