App Icon Problems

CharlesIPTI

Active Member
Licensed User
Longtime User
I cannot set the applications Icon. I've even gone as far as attempting to manually correct the manifest file, force it to read only and it still doesn't drop my custom icon. What are the acceptable File extensions for an application Icon File. and How can I make the IDE accept the new icon for the install to the device?

I've chosen the file from both the files directory and the res directory, and neither of them get dropped from the app install to device


Please and thank you ...
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
As far as icons and images in general I use PNG. Linux based OS always do well with them and they look much nicer than other images. Most of the time they are the same size, slightly smaller, or slightly larger than a JPEG of the same at good quality (90%+). Plus you have alpha channels that look nicer for icons, buttons, and tabs.
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
No luck yet

Thank you but this still fails does anyone have the syntax for the Manifest file as it would look in manifest editor for B4A if the image is

MyImage.png

no resource found that matches the given name (at 'icon' with value '@drawable/icon')
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
why not in the IDE just click 'Projects' menu and select 'Choose Icon' this copies and renames the file as required to be the apps icon
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
thats kinda the point THAT is failing with the Manifest as Either read only or open to write
that setting is NOT sticking ...
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Solution !!

Over write icon with whatever you using and NAME it ICON AND make it read only

path is \Objects\res\drawable
I noticed this in the manifest file
SetApplicationAttribute(android:icon, "@drawable/icon")

and I was like ohh its another alias you cant use your own file name this placeholder for icon is hard coded somewhere ....
you HAVE to name YOUR file ICON
Then make it read only

Gaaaaaahhh!!!
 
Upvote 0

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Sounds like the problem is being Read Only happy. Neither of those files (icon or manifest) need to be Read Only, and doing so will just cause problems like this and others. If you fix the files, the menu option should work. Selecting it using the menu automatically places the file in the folder and names it icon (icon.png in my case). It looks like it actually defaults to png since no specified in the XML. Could be your other jpg files and such there (mentioned in another thread) confused it too.

Seems it is possible to have 3 versions of the file too although I'm not sure how that would work with B4A. How to change the icon of your Android app | EnvyAndroid.com
 
Upvote 0

IanMc

Well-Known Member
Licensed User
Longtime User
Strange app icon problem

I have changed my app icon and checked that it is the correct icon in the correct folder as per margret's instructions but here's the thing.

I uninstall my app from my device, then I compile it and it re-installs.

When I find my installed app it shows with the old icon and it looks like the new icon might be behind the old icon and perhaps even another older icon behind that.

Same when I go to Manage Apps.

This may be some kind of problem with my device rather than B4A.

The Manifest file looks fine.

I'll try to install it on my friend's device to see, I'd rather not have to factory reset again :)

Ah yes, false alarm, when I installed it on to my friend's phone its fine.

Must be my phone's (rather strange) setup that is causing this.
 
Last edited:
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
Use your PC to look in the objects/res/drawable folder and see what is there. The default fileit is looking for is icon.png. Look at this file with the PC and see what it looks like. It should be all lower case letters. If it looks right, in the IDE use tools, clean project and then recompile and install again. Some devices do not update these icons until they reboot. If it does not look right, power down and restart your device and see if it shows the correct icon.
 
Upvote 0

IanMc

Well-Known Member
Licensed User
Longtime User
Thanks margret

I have the correct icon in Objects\res\drawable, checked that when I read your previous post. Tried the clean project and the clean files options then I tried uninstalling my app and rebooting my device but nothing helped.

I have a rather strange theme on my phone and I think it is this causing it.

My app shows the correct icon when I install it on my friends phone so all is good.
 
Upvote 0
Top