Experimental browser for the Atmosphere
{ "uri": "at://did:plc:oisofpd7lj26yvgiivf3lxsi/com.whtwnd.blog.entry/3lojqicnsbn2x", "cid": "bafyreiaw6vvxuhec3oeynet2oewsyejtqt5evxifvevmmwzy6pw6hxxrd4", "value": { "$type": "com.whtwnd.blog.entry", "theme": "github-light", "title": "Stick this in your fullscreen Activities", "content": "Who knows if this is \"right\". I don't care. Just stick this in your fullscreen Activites to avoid pain and sorrow every time you create a new one.\n\n```kt\nViewCompat.setOnApplyWindowInsetsListener(root) { view, insets ->\n val systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.navigationBars())\n view.setPadding(0, systemBarsInsets.top, 0, systemBarsInsets.bottom)\n insets\n}\n\n// 31 or higher\nif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {\n window.insetsController?.let {\n it.systemBarsBehavior = android.view.WindowInsetsController.BEHAVIOR_DEFAULT\n }\n} else {\n @Suppress(\"DEPRECATION\")\n window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)\n}\n```", "createdAt": "2025-05-06T20:39:21.715Z", "visibility": "author" } }