phonegap / build

This is the public repository for PhoneGap Build source and bug tracking
92 stars 33 forks source link

Landscape splash screen not working #482

Open kevgrig opened 8 years ago

kevgrig commented 8 years ago

I've reviewed the previous bug reports on this (e.g. bug #198) and tried various things but the landscape splash screen is not working for me on an Android 4.1.2 LG Optimus F3Q:

screenshot_2015-11-22-14-01-13

Here's one of the landscape images I expect:

screen-mdpi-landscape

The project is entirely public and open source and here are the relevant sections of config.xml:

<plugin name="cordova-universal-clipboard" />
<platform name="android">
    <splash qualifier=""           src="splash.png" />
    <splash qualifier="port-ldpi"  src="www/res/screen/android/screen-ldpi-portrait.png" />
    <splash qualifier="land-ldpi"  src="www/res/screen/android/screen-ldpi-landscape.png" />
    <splash qualifier="port-mdpi"  src="www/res/screen/android/screen-mdpi-portrait.png" />
    <splash qualifier="land-mdpi"  src="www/res/screen/android/screen-mdpi-landscape.png" />
    <splash qualifier="port-hdpi"  src="www/res/screen/android/screen-hdpi-portrait.png" />
    <splash qualifier="land-hdpi"  src="www/res/screen/android/screen-hdpi-landscape.png" />
    <splash qualifier="port-xhdpi" src="www/res/screen/android/screen-xhdpi-portrait.png" />
    <splash qualifier="land-xhdpi" src="www/res/screen/android/screen-xhdpi-landscape.png" />
  </platform>

PhoneGap build application: https://build.phonegap.com/apps/1133885/share

I noticed that the APK that PhoneGap Build creates doesn't seem to have any of the landscape splash images:

$ jar tvf myplaceonline-release.apk | grep splash
  1173 Sun Nov 22 21:57:34 PST 2015 assets/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js
   938 Sun Nov 22 21:57:14 PST 2015 assets/www/splash.png
   469 Sun Nov 22 21:57:34 PST 2015 res/drawable-mdpi-v4/splash.png
   469 Sun Nov 22 21:57:34 PST 2015 res/drawable/splash.png

Any ideas why PhoneGap Build isn't packaging the landscape splash screens?

goya commented 8 years ago

none of those splashes or icons exist at www/res/ they are at res/

for future issues for troubleshooting please start a conversation at community.phonegap.com.

kevgrig commented 8 years ago

Great catch @goya, thank you! This was due to the example at https://github.com/phonegap/phonegap-app-hello-world/blob/master/www/config.xml.

goya commented 8 years ago

hmm unsettling. im gonna reopen this as we should be a drop in replacement for cli projects

kevgrig commented 8 years ago

Here's how I created the app:

$ phonegap create my-app --template hello-world

Which uses the www folder in the icon & splash locations:

$ grep -m 1 splash.*res my-app/config.xml 
<gap:splash gap:platform="android" gap:qualifier="port-ldpi" src="www/res/screen/android/screen-ldpi-portrait.png" />

However, at some point I moved the config.xml into the www directory as per the PhoneGap Build instructions:

PhoneGap Build's only requirement for your application structure is that the config.xml and index.html is in the top level of your application.

jessemonroy650 commented 8 years ago

@kevgrig Do you realize now that you need to reference your images (in config.xml) relative to the directory your are in, and not where it was?

kevgrig commented 8 years ago

@jessemonroy650 My issue is resolved. I believe @goya re-opened this to review if the template project jives with the phonegap manual; please see his comment above.

jessemonroy650 commented 8 years ago

@kevgrig until you wrote you "resolved" the issue two (2) days ago, it was unclear that your issue was resolved. Good to see it is.

hlmortensen commented 6 years ago

I'm using PhoneGap Build and the splash screen is way to big and mostly cut-off in landscape mode on Android tablets (including Nexus 10 API 27 Tablet). I'm using the qualifiers but something is not right. Portrait mode looks good.

Is there a preference or other setting to make the landscape splash screen fit to the screen? Below are my splash screen settings for Android along with sizes in the comments. Thanks.

<!-- Landscape -->
<!-- width="320" height="200" -->
<splash src="res/screen/android/splash-land-ldpi.png" qualifier="land-ldpi" platform="android" />
<!-- width="480" height="320" -->
<splash src="res/screen/android/splash-land-mdpi.png" qualifier="land-mdpi" platform="android" />
<!-- width="800" height="480" -->
<splash src="res/screen/android/splash-land-hdpi.png" qualifier="land-hdpi" platform="android" />
<!-- width="1280" height="720" -->
<splash src="res/screen/android/splash-land-xhdpi.png" qualifier="land-xhdpi" platform="android" />
<!-- width="1600" height="960" -->
<splash src="res/screen/android/splash-land-xxhdpi.png" qualifier="land-xxhdpi" platform="android" />
<!-- width="1920" height="1280" -->
<splash src="res/screen/android/splash-land-xxxhdpi.png" qualifier="land-xxxhdpi" platform="android" />