Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Android Adaptive Icons - Where is the AndroidResources template?
Started by nml2727 Dec 07 2019 05:15 PM

7 replies to this topic
android adaptive icons androidresources icon android icons
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 89 posts
  • Corona SDK

Reading through the Android Adaptive Icons guide I come across the following statement:

 

"...Corona Labs provides example AndroidResources folders when you create a new project from the Welcome screen or menu, or you can copy the folder out of a Corona SampleApp..."

 

However, in the projects that I've created, I don't see any folder named AndroidResources.   I just have a bunch of png files in the project named Icon.png, Icon-hdpi.png, etc...  

 

In the guide it talks about how you need to place these ic_launcher.png files under the AndroidResources/res directory and also there is some xml file which you can modify to change the background color/image.

 

Guess I must be missing something, but where is this sample AndroidResources folder at?



[TOPIC: post.html]
#2

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 572 posts
  • Corona SDK

What version of Corona are you using?  I created a test app and I see the folder.



[TOPIC: post.html]
#3

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 89 posts
  • Corona SDK

About Corona Simulator says "2018.3326 (2018.6.25)" 



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,544 posts
  • Enterprise

You have to be using Corona daily build 2019.3525 or later, but I would recommend using the latest daily build.

 

Rob



[TOPIC: post.html]
#5

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 89 posts
  • Corona SDK

Since I downloaded Corona several months ago I haven't ever updated.   Probably a dumb question, but apart from downloading it again from the main corona site and reinstalling, is there some way to just update it to the most recent version?



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,544 posts
  • Enterprise

There is a link at the top of this page labeled "Daily Builds". You can get the most recent version from there.

 

Rob



[TOPIC: post.html]
#7

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 89 posts
  • Corona SDK

Ty, Rob.  I downloaded the latest build and was able to see the example folder structure.  I replaced all of the "ic_launcher_foreground" files with the various size pngs:   108x108 for mipmap-mdpi, 162x162 for mipmap-hdpi, etc, as per the guide.  

 

However, when I build to my device the icons seemed to be zoomed in too much.  

 

I'm guessing this might be to my misunderstanding this statement: "... fit in the center 66% of the image,..."

 

I just calculated the area of 108x108 and then took 2/3 of that and took the square root and came up with something like 88 x 88 is where the icon should actually fit inside.  Is that wrong?  Or is there any other reason why the icon would be too zoomed in?



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,544 posts
  • Enterprise

Basically the icon is made up of three parts, two you provide and one the device provides.

 

You provide a background, generally a solid color. Then a mask is applied by the device. That mask could be square, a rounded rectangle, a circle or who knows what other shape. Your front image has to fit inside the mask, so you have to provide enough transparency around the front image to get it to 108x108 but the actual artwork should be 88x88 inside a 108x108 transparent background.

 

If your image isn't large enough, it will zoom the icon making it too large and risk getting cut off by the mask.

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: android, adaptive icons, androidresources, icon, android icons