Skip to content

Commit

Permalink
android splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Apr 4, 2017
1 parent c8a349e commit 6029c93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/config.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
xmlns:android = "http://schemas.android.com/apk/res/android"
id = "{{ app_id }}"
version = "{% templatetag openvariable %}version{% templatetag closevariable %}" >
<name>{{ project_name }} Project</name>
<description>{{ project_name }} Project</description>
{% verbatim %}
<platform name="android">
{{#android.icons}}
<icon src="{{filename}}" density="{{alias}}" />
<icon src="{{filename}}" density="{{density}}" />
{{/android.icons}}
{{#android-splash.icons}}
<icon src="{{filename}}" density="{{density}}" />
{{/android-splash.icons}}
</platform>

<platform name="ios">
Expand All @@ -35,7 +39,15 @@
<plugin name="cordova-plugin-camera" />
<plugin name="cordova-plugin-geolocation" />
<plugin name="cordova-plugin-dialogs" />

<plugin name="cordova-plugin-whitelist" />
<access origin="*" />

<plugin name="cordova-plugin-splashscreen" />
<config-file platform="android" parent="/manifest">
<application android:theme="@android:style/Theme.NoTitleBar" />
</config-file>
<preference name="ShowSplashScreenSpinner" value="false" />

{% endverbatim %}
</widget>
1 change: 1 addition & 0 deletions app/js/pginit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ document.addEventListener('deviceready', function() {
require(['{{ project_name }}/main', 'wq/app'], function(ready, app) {
ready.then(function() {
app.replaceState('');
setTimeout(navigator.splashscreen.hide, 10);
});
});
});
Expand Down

0 comments on commit 6029c93

Please sign in to comment.