In order to have a splash screen in a PhoneGap Android application you need to put your splash. Png file into res/drawable-ldpi, res/drawable-mdpi, res/drawable-hdpi, res/drawable-xdpi. Where those directories represent low, medium, high and extra large dots per inch.
You'll need to resize you slash. Png for each directory or Android will stretch it for you.
Up vote 9 down vote favorite 7 share g+ share fb share tw.
Could anybody please advise how I can add a splash screen to my HTML5 Phonegap based Android App. I just want it to display for 5 seconds on load. ALso - can anybody advise what dimensions the splash screen should be.
Thanks for your help Paul android eclipse phonegap link|improve this question asked Nov 16 '11 at 18:36Paul667520 64% accept rate.
Just a friendly piece of advice, under no circumstances is it a good idea to put a splash screen on a mobile app. It's going to make your users super angry. – Kurtis Nusbaum Nov 16 '11 at 18:52 7 I am sorry Kurtis, I am not sure what you are advocating.
There are many very popular mobile apps that show a splash screen while they are loading without causing annoyance to their users. IOS even has an image caused Default. Png specifically for this purpose.
– Devgeeks Nov 16 '11 at 19:58.
In order to have a splash screen in a PhoneGap Android application you need to put your splash. Png file into res/drawable-ldpi, res/drawable-mdpi, res/drawable-hdpi, res/drawable-xdpi. Where those directories represent low, medium, high and extra large dots per inch.
You'll need to resize you slash. Png for each directory or Android will stretch it for you. The sizes of each image should be: xlarge: at least 960 x 720 large: at least 640 x 480 medium: at least 470 x 320 small: at least 426 x 320 Then in your main Java class, the one that extends DroidGap, you'll need to add one line and modify another.
First add: super. SetIntegerProperty("splashscreen", R.drawable. Splash); this line should show up under super.
OnCreate but before super.loadUrl. Then you'll need to modify your loadUrl method to pause for 5 seconds before loading up the main page. It would look like this: super.
LoadUrl("file:///android_asset/www/index. Html", 5000); That should do it for you.
– Paul Nov 16 '11 at 19:35 2 There seems to be an issue using the timeout parameter in PhoneGap 1.2. See also stackoverflow.com/questions/8100219/… – Paul Beusterien Nov 16 '11 at 23:12 1 If I remove the 5 second timeout the app compiles and displays briefly on load - so it looks like a combination of above with a timeout fix would work a treat.. cheers for your help – Paul Nov 17 '11 at 10:10 Yup, apparently there is a bug in 1.2 as Paul B mentioned. Bryce has already checked in a fix for it though. – Simon MacDonald Nov 17 '11 at 14:31 Just in case anyone is wondering, do NOT use a 9-patch image for your splash screen if you are developing with Phonegap.
They do not support this, though they may in the future. Community.phonegap.com/nitobi/topics/… – Wytze 1.2.0 at 10:44.
In my Phonegap app, Android version, Eclipse debugger throws tantrums if you set the splash screen or even the 'loading' dialog before calling loadUrl. Both will work in the actual app installed on a device, but they will break your debugging. So I've put them behind loadUrl, where they can do no harm and still show well before the app itself.
Public class App extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super. OnCreate(savedInstanceState); super.
LoadUrl("file:///android_asset/www/index. Html",5000); super. SetStringProperty("loadingDialog", "Starting your app..."); super.
SetIntegerProperty("splashscreen", R.drawable. Splash); ... }...
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.