{"id":126,"date":"2023-02-18T11:52:12","date_gmt":"2023-02-18T03:52:12","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=126"},"modified":"2023-02-18T11:52:36","modified_gmt":"2023-02-18T03:52:36","slug":"android-activity-full-screen","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/18\/android-activity-full-screen\/","title":{"rendered":"Android Activity\u8bbe\u7f6e\u5168\u5c4f\u663e\u793a"},"content":{"rendered":"<h2>\u4ee3\u7801\u4e2d\u8bbe\u7f6e<\/h2>\n<pre><code class=\"language-java\">requestWindowFeature(Window.FEATURE_NO_TITLE); \/\/\u9690\u85cf\u6807\u9898\ngetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, \n    WindowManager.LayoutParams.FLAG_FULLSCREEN); \/\/\u8bbe\u7f6e\u5168\u5c4f\n\nsetContentView(R.layout.activity_main);<\/code><\/pre>\n<p><!-- more --><\/p>\n<blockquote>\n<p>\u6ce8\u610f\uff1asetContentView\u4e00\u5b9a\u8981\u5199\u5728\u8bbe\u7f6e\u5168\u5c4f\u540e\u8fb9<\/p>\n<\/blockquote>\n<h2>AndroidManifest.xml\u6587\u4ef6\u4e2d\u8bbe\u7f6e<\/h2>\n<pre><code class=\"language-xml\">&lt;application\n    android:allowBackup=&quot;true&quot;\n    android:icon=&quot;@drawable\/icon&quot;\n    android:label=&quot;@string\/app_name&quot;\n    android:theme=&quot;@style\/AppTheme&quot;\n    android:name=&quot;com.scwindow.utility.CrashApplication&quot;&gt;<\/code><\/pre>\n<p>\u5728styles.xml\u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e3b\u9898AppTheme<\/p>\n<pre><code class=\"language-xml\">&lt;!-- Application theme. --&gt;\n&lt;style name=&quot;AppTheme&quot; parent=&quot;AppBaseTheme&quot;&gt;\n    &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;\n    &lt;item name=&quot;android:windowNoTitle&quot;&gt;true&lt;\/item&gt;    \n    &lt;item name=&quot;android:windowFullscreen&quot;&gt;true&lt;\/item&gt;   \n    &lt;item name=&quot;android:windowIsTranslucent&quot;&gt;true&lt;\/item&gt;\n&lt;\/style&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee3\u7801\u4e2d\u8bbe\u7f6e requestWindowFeature(Window.FEATURE_NO_TITLE); \/\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[60],"class_list":["post-126","post","type-post","status-publish","format-standard","hentry","category-android-basic","tag-activity"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/126\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}