Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[Android] add xhdpi support #9

Closed
hardeep opened this Issue Jun 25, 2012 · 38 comments

Comments

Projects
None yet

Hi Hardeep

Similar issue reported. It seems more and more Android device now require xhdpi and largescreen support

http://community.phonegap.com/nitobi/topics/icon_not_displaying
http://community.phonegap.com/nitobi/topics/launcher_icon_for_xhdpi
http://community.phonegap.com/nitobi/topics/android_splash_screens_on_pgb_again

Please expedite

Thanks!

Agreed, with the Nexus 7 especially growing in popularity, I am seeing this issue more and more.

Fannon commented Aug 6, 2012

Got the same problem here:

I've tryed some time around but got still the default Icon for xhdpi Android Devices. If I took a look into the apk the problem is that in res/drawable and res/drawable-xhdpi the Phonegap Default Icon is still used.

My config.xml:

<icon src="icon.png" width="96" height="96" />
<icon src="icons/ios/icon.png" width="57" height="57" />
<icon src="icons/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="icons/ios/icon_at_2x.png" width="114" height="114" />
<icon src="icons/android/ldpi.png" gap:platform="android" gap:density="ldpi" width="36" height="36"/>
<icon src="icons/android/mdpi.png" gap:platform="android" gap:density="mdpi" width="48" height="48"/>
<icon src="icons/android/hdpi.png" gap:platform="android" gap:density="hdpi" width="72" height="72"/>

I've tryed to enter this (Would seem logicaly to me)

<icon src="icons/android/xdpi.png" gap:platform="android" gap:density="xhdpi" width="96" height="96"/>

But still doesn't work.

Fannon commented Aug 6, 2012

Problem appears with Galaxy Nexus Phone and Sony Xperia S Phone too.

Fannon commented Aug 13, 2012

Note for others: This bug doens't exist with PhoneGap 1.7.0. So using this explicit in the config.xml solves the problem for me now.

@Fannon Can you elaborate? Building against 1.7.0 actually allows xhdpi support?

Fannon commented Aug 13, 2012

yes. This LOC in my config.xml actually allowed xhdpi to work:

<preference name="phonegap-version" value="1.7.0" />

My (default) Icon is 96x96

Greets,
Simon

Contributor

alunny commented Aug 17, 2012

This should be fixed as of yesterday - please report back if you're still having issue with this.

Im still having issues with this.
Using apktool to unpack the generated file, I see the drawable-xhdpi folder being created but it uses a 72x72 icon instead?

I am also having this issue on my Samsung Galaxy Nexus... the default icon is used.

@hardeep hardeep was assigned Oct 4, 2012

lfeehan commented Oct 15, 2012

As per FattusMannus comment above this is still broken.

Despite including a 96x96 png and adding its path to the config.xml unpacking the resulting apk shows the xhdpi folder contains a 72x72 png.

I am having the exact same issue. After downloading the APK from the PhoneGap Build site, I add a .zip extension to it. Then when I browse to the *.apk.zip\res\drawable-xhdpi folder, I can see that the resulting icon and splash screen images are in fact the hdpi versions.

same for me. Using Samsung Galaxy S3. Packaged xhdpi versions but with no effect. Used the cloud build of Adobe.

rh2600 commented Nov 28, 2012

Yup... same issue on Samsung Galaxy Nexus

Can we relabel this issue as a bug?

This is incorrectly labeled as an "Enhancement" when it should be "Bug".

I have the same issue.

Phonegap Build uses the hdpi icon for xhdpi res.

Any word on this?

Any update?

gteschl commented Jan 27, 2013

no update? it´s a big problem for us!

Should be an easy fix!

On Sun, Jan 27, 2013 at 5:20 AM, gteschl notifications@github.com wrote:

update? it´s a big problem for us!


Reply to this email directly or view it on GitHubhttps://github.com/phonegap/build/issues/9#issuecomment-12752280.

gteschl commented Jan 30, 2013

They shouldnt make new Plugins, they should fix this Bugs! Cant build Apps for xhdpi screens because icons are wrong size!

This is still an issue on Samsung S2's too

Is there an update/timeline for this bugfix?

gteschl commented Mar 4, 2013

i think i have to watch out for a other, working solution ... this looks like an endless story here

Well, while we're still waiting for an official fix for the bug, here's a Python script that will fix an APK built by PhoneGap Build to put the correct XHDPI splash and icon images in. It's not perfect, but it'll work for now. Note that you need to have apktool and jarsigner installed and on the PATH.

If you want to sign the APK with something other than the Android debug key, you'll have to change the jarsigner line near the bottom.

atuttle commented Apr 18, 2013

Just chiming in to say that 8 months after the supposed fix ... we still have this issue.

Hi guys, any news on this issue? Icon app is still small on a Nexus 4 using PGB 2.5.0.

gteschl commented Apr 21, 2013

Meanwhile i learned objective-c & Java ;) ... Bye Bye phonegap

@hardeep Do you have an update on this?

atuttle commented May 8, 2013

I couldn't get the Python script working. Here's a node.js script that will fix the icon and splash screen, and prompts you for the necessary passwords, alias, etc.

sjeatdsi commented May 8, 2013

I bet they haven't seen this thread in a long, long time...

atuttle commented Jun 4, 2013

Is it just me or has this been fixed? (I did recently upgrade my apps to use PG 2.7 so maybe that had something to do with it?)

Accepted as fixed on July 15, 2013

The issue still persist with Phonegap Build, I still get default Phonegap Icon in my res folders and on the Device(Galaxy s3)

got the same bug with phonegap build on 2.9.0, 3.1.0 - LG L9 and LG Optimus 4X HD, both Android 4.1.2

Is there any news on this I am having the same issue - small icons on HTC1 its not good at all - using phonegap build????

red2678 commented Mar 29, 2014

Same on a s3 with phonrgap build.

I HAVE FIXED IT!!!!
This is the icon section on my config file for Android on phonegap:

<!-- Define app icon for each platform. -->
<icon src="icon.png" gap:role="default" />

I have commented out all the other android options!!!!

Now all I have done is make my icon.png file 150px x 150px

It works perfectly on all devices including xhdpi Like my HTC one and Nexus 7 and scales fine on my alcatel cheapo android device!! Try it it works!

Cheers
Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment