how to create proper icons for your app

Eduard

Active Member
Licensed User
Longtime User
I read this documentation:
Marketing Your App - Basic4android Wiki
For a tip about creating icons from Windows fonts, see this post.
In the IDE, click Project and Choose Icon. An icon should look good on anything from a 3.5" phone to a 10.1" (or larger) tablet. The best way to assure that is to create icons for different size devices. Here are the steps for that:
1. In your app's folder on your PC, change to the Objects/res folder. You should see a folder named "drawable". If you have already added an icon, you will see it in that folder.
2. Create other folders for different sized devices. You can vary the icon based on device size or on density. This example uses device size. For more information, see this web page. Create four new folders in the Objects/res folder:
(a) drawable-xlarge (7" to 10"+ devices)
(b) drawable-large (4" to 7" devices)
(c) drawable-normal (3" to 4.25" devices)
(d) drawable-small (under 3.25")
3. Create an icon for each size (e.g.: 80x80 for normal, 150x150 for large, 220x220 for extra large). Since the app's icon normally doesn't show on an emulator, you will need to find actual devices of different sizes to test on or perhaps load the icon file into an ImageView in a test app to see it. And of course, copy the files into the appropriate folder.
4. Once in the folders, give each file the same name as the one (if any) in the "drawable" folder, such as "icon.png". Notice that if one is named differently, such as "icon.jpg", it will not appear on the device's screen.
5. MAKE THE FILES READ-ONLY!!!! If you do not make the files read-only before you compile, B4A will delete the files and you get to start over.

I got another tip about creating icons:
Android Asset Studio

And I have some questions:
1) Why do icons need to be 80x80, 150x150 and 220x220? I can't find this anywhere on the internet. Icons need to be 48,72,96 or 144 pixels if I'm not mistaken. But there seems to be a difference in launcher icons and action bar icons. I see that 32x32, 48x48 and and 64x64 is for action bar.

2) What folders do I need to create?
drawable-mdpi,drawable-hdpi,drawable-xhdpi,drawable-xxhdpi?

Or should I use drawable-small, drawable-normal, drawable-large etc..?

what happens if I only create a drawable-xxhdpi version?

3) Making files read-only seems a workaround. Can this be fixed?

4) I've created the following sizes for my app icon:
512x512 (for google play store)
144x144 launcher icon xxhdpi
96x96 launcher icon xhdpi
72x72 launcher icon hdpi
64x64 action bar icon xhdpi
48x48 launcher icon mdpi / action bar icon hdpi
32x32 action bar icon mdpi

4a) which of these should I upload to project in b4a menu: project -> choose icon?

4b) how should I name these icons en where should I put them in appfolder\Objects\res ?
 
Last edited:

Eduard

Active Member
Licensed User
Longtime User
So I should follow the documentation of B4A, not the docs of Android. I first delete the directory "drawable" in Objects/res

Then I create 4 directories:
drawable-small
drawable-normal
drawable-large
drawable-xlarge

And place in these directories the icons with name "icon.xxx" and make them read only.

Do they really need to be 80x80, 150x150 and 220x220? What size should go into directory "drawable-small"? It seems none of them is of a proper size. How does the system determine the icon to use? Can I use other sizes?
 
Upvote 0

bsnqt

Active Member
Licensed User
Longtime User
So I should follow the documentation of B4A, not the docs of Android. I first delete the directory "drawable" in Objects/res

Then I create 4 directories:
drawable-small
drawable-normal
drawable-large
drawable-xlarge

And place in these directories the icons with name "icon.xxx" and make them read only.

Do they really need to be 80x80, 150x150 and 220x220? What size should go into directory "drawable-small"? It seems none of them is of a proper size. How does the system determine the icon to use? Can I use other sizes?

Look at this link

http://www.b4x.com/forum/basic4andr...hat-your-recommendations-size-format-etc.html

I had same question, and it was resolved. Now my icons are perfect.
 
Upvote 0
Top