{"id":279,"date":"2013-11-07T11:42:38","date_gmt":"2013-11-07T03:42:38","guid":{"rendered":"https:\/\/yanjingang.com\/blog\/?p=279"},"modified":"2016-01-26T11:42:54","modified_gmt":"2016-01-26T03:42:54","slug":"%e7%bb%99%e4%bd%bf%e7%94%a8cordova%e7%9a%84android%e7%a8%8b%e5%ba%8f%e5%8a%a0%e4%b8%8asplash-screen-%e5%90%af%e5%8a%a8%e5%9b%be%e7%89%87","status":"publish","type":"post","link":"https:\/\/yanjingang.com\/blog\/?p=279","title":{"rendered":"\u7ed9\u4f7f\u7528cordova\u7684Android\u7a0b\u5e8f\u52a0\u4e0asplash screen \u542f\u52a8\u56fe\u7247"},"content":{"rendered":"<p>For Android,<\/p>\n<p>In your config.xml, you need to add the following preference<\/p>\n<p><code>&lt;preference name=\"splashscreen\" value=\"foo\" \/&gt;<\/code><\/p>\n<p>Where foo is the name of the splashscreen file. Preferably a 9 patch file. Make sure to add your splashcreen files to your res\/xml directory under the appropriate folders.<\/p>\n<p>For Android, you also have to edit your projects main java file. You must add a second parameter representing a time delay to your super.loadUrl.<\/p>\n<p><code>super.loadUrl(Config.getStartUrl(), 10000);<\/code><\/p>\n<p>To install this plugin, follow the\u00a0<a href=\"http:\/\/cordova.apache.org\/docs\/en\/edge\/guide_cli_index.md.html#The%20Command-line%20Interface\" target=\"_blank\">Command-line Interface Guide<\/a>.<\/p>\n<p>If you are not using the Cordova Command-line Interface, follow\u00a0<a href=\"http:\/\/cordova.apache.org\/docs\/en\/edge\/plugin_ref_plugman.md.html\" target=\"_blank\">Using Plugman to Manage Plugins<\/a>.<\/p>\n<p><a href=\"https:\/\/github.com\/apache\/cordova-plugin-splashscreen\" target=\"_blank\">https:\/\/github.com\/apache\/cordova-plugin-splashscreen<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For Android, In your config.xml, you need to add the fo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[193],"tags":[195,196],"_links":{"self":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/279"}],"collection":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":0,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"wp:attachment":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}