0
votes

When I set up a native Adroid app with Sencha Touch 2, I get a blank white screen on the device before the index.html is displayed and no splash Image. I used the SDK Tools to create the app and tested this on multiple android devices.

I have tired different Approaces:
To speed up loading, i passed a empty css file --> no difference
I removed everything besides the microloader from the index.html
Someone suggested using a background Image in the index.html --> no difference, index.html is displayed after the white screen.
I have also inspected the generated apk file which actually contains the default splash images.

Test Enviroment
Windows 7 x64
java 7 x64
Android SDK API lvl 7 installed (since the build tool only generates apps for API lvl 7)
Sencha SDK Tools 2.0.0beta3
Sencha touch 2.0.1

Steps to Reproduce the Issue

sencha app create name /path
set Android sdk path in packager.json
set platform to "Android" in packager.json
sencha app build native

My top priority would be to remove the white screen if possible, or at least turn it black.
Also I wonder if it is possible to cover it up with a splash Image, like on iOS?

1
Did you try to change the background color of the webview to black?b.i
I'd have to take a look at senchas native wrapper to do so i guess...Amsel
You are trying to display a html in Android. You have to use webview.loadUrl("path to index.html"); All you have to do to turn the white page black is: webview.setBackgroundColor(Color.BLACK)b.i
@b.i That would certainly work, but i don't want to write my own native wrapper for my app, can i do that in PhoneGap?Amsel

1 Answers

0
votes

Im using phonegap to package the sencha touch app as native in Android and iOS. Then I use the following code in the main class on Android to set the splashscreen:

setIntegerProperty("splashscreen", R.drawable.splash);

The image files should be in

res/drawable-hdpi/splash.png
res/drawable-mdpi/splash.png
res/drawable-ldpi/splash.png

Also I set a background-image to be shown when the android browser has been loaded.