{"id":16164,"date":"2026-02-28T09:06:37","date_gmt":"2026-02-28T01:06:37","guid":{"rendered":"http:\/\/xinyiworld.top\/wordpress_it\/?p=16164"},"modified":"2026-02-28T09:06:37","modified_gmt":"2026-02-28T01:06:37","slug":"%e6%b2%89%e6%b5%b8%e5%bc%8f%e7%8a%b6%e6%80%81%e6%a0%8f%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=16164","title":{"rendered":"\u6c89\u6d78\u5f0f\u72b6\u6001\u680f\u5b9e\u73b0"},"content":{"rendered":"<p><a href=\"https:\/\/blog.csdn.net\/zxj2589\/article\/details\/136039687\">https:\/\/blog.csdn.net\/zxj2589\/article\/details\/136039687<\/a><\/p>\n<h1>\u65b9\u5f0f2<\/h1>\n<pre><code>class MainActivity: ComponentActivity() {\n    private val TAG = &quot;MainActivity==&gt;&quot; \n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        enableEdgeToEdge()\n        setContent {\n            DisposableEffect(Unit) {\n                enableEdgeToEdge(\n                    statusBarStyle = SystemBarStyle.auto(\n                        android.graphics.Color.TRANSPARENT,\n                        android.graphics.Color.TRANSPARENT,\n                    ) {false}, \/\/\u8fd9\u91cc\u7684\u610f\u601d\u662f\u662f\u5426\u9700\u8981\u68c0\u6d4b\u6df1\u8272\u4e3b\u9898\u6a21\u5f0f\uff0c\u6211\u4eec\u4f7f\u7528\u81ea\u5df1\u7684\u80cc\u666f\uff0c\u6240\u4ee5\u4e0d\u9700\u8981\u76f4\u63a5\u8bbe\u7f6e\u4e3afalse,\u4e0b\u9762\u4e5f\u662f\u4e00\u6837\u7684\n                    navigationBarStyle = SystemBarStyle.auto(\n                        lightScrim,\n                        darkScrim,\n                    ) { false},\n                )\n                onDispose {}\n            }\n            Column(\n                modifier = Modifier\n                    .background(Color.White)\n                    .fillMaxWidth()\n                    .fillMaxHeight()\n                    .statusBarsPadding()\n            ) {\n                \/\/ \u663e\u793a\u4f60\u7684UI\n            }\n        }\n    }\n\n    override fun onConfigurationChanged(newConfig: Configuration) {\n        Log.i(TAG, &quot;onConfigurationChanged: $newConfig&quot;)\n        super.onConfigurationChanged(newConfig)\n    }\n\n    private val lightScrim = android.graphics.Color.argb(0xe6, 0xFF, 0xFF, 0xFF)\n    private val darkScrim = android.graphics.Color.argb(0x80, 0x1b, 0x1b, 0x1b)\n}\n<\/code><\/pre>\n<p>\u901a\u8fc7DisposableEffect\u5373\u53ef\u5b9e\u73b0\uff0c\u65e0\u987b\u5f15\u5165\u7b2c\u4e09\u65b9API\u3002<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"16164\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>https:\/\/blog.csdn.net\/zxj2589\/article\/details\/1360 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[389],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16164"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16164"}],"version-history":[{"count":1,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16164\/revisions"}],"predecessor-version":[{"id":16165,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/16164\/revisions\/16165"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16164"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}