Android Icon

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Android Icon

Post by Imerion »

I have now tried every way I can think of to make my exported Android-apk display my included icon, but it doesn't seem to work. It is 48x48 pixels. Are there any other requirements?
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

You can provide several PNG icons for your android application, see this manual for details. When building a final application version, I usually use all icon variants, i.e., drawable-hdpi, drawable-ldpi, drawable-mdpi, and drawable-xhdpi. By default, ZGE uses just drawable-ldpi with 36x36 icon.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

But how do I add multiple icons? ZGE has an option to load an application icon, so I used it. But perhaps Android icons has to be added in some other way?
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

AFAIK the ZApplication.Icon property is used just for Windows to add .ico file (maybe also bmp) for the generated exe. To change the icon on Android, look in the generated folder structure (use the Project/Android: Build APK menu item), namely the res sub-folder which contains application resources, including icons. You can create several sub-folders in the res folder, containing the application icon in different resolutions:

- drawable-ldpi for 36x36
- drawable-mdpi for 48x48
- drawable-hdpi for 72x72
- drawable-xhdpi for 96x96

It is recommended to use 32-bit .png format with transparency.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion »

Ah, I should have figured that out. But thanks a lot for the help, now I should be able to finish this project!
Post Reply