Android [SOLVED] Adaptive Icons

Discussion in 'GameMaker Studio 2 Community Tech Support' started by SnortySnoopy, Oct 3, 2018.

  1. SnortySnoopy

    SnortySnoopy Member

    Joined:
    Apr 25, 2018
    Posts:
    186
    Here I quote what Dan mentioned in the "GMS Version 2.2.0" topic in this section:

    I'm confused with the content of the FAQ. Please explain to me about these;
    1. Do I have to rename the folders to match my target API? Say my target API is 28; Do I need to rename the folder as drawable-hdpi-v28 instead of what the FAQ mentioned (drawable-hdpi-v26)? Or is it alright to follow what the FAQ mentioned even if my target API is 28?
    2. The FAQ mentioned we must make drawable folders for all the icon sizes supported by GMS2. The Dev Documentation stated this "Each drawable must be 108dp x 108dp in size; background drawables must be opaque whilst foregrounds can contain transparency." The icon sizes in GMS2 are 36x36, 48x48, 72x72, 96x96, 144x144, and 192x192. For these 2 sizes; 144 and 192, they're over that 108 limit. Do we still have to make it have a foreground and background images? If yes, what's the dimension for those to be made adaptive? If not, do we still need to place the icon.xml in xxhdpi and xxxhdpi folders despite not having a foreground.png in each of those 2 folders? Or do we make a transparent .png that matches the background.png size just so these folders have 2 .png files in it like the others?
    Thank you.
     
  2. Pano

    Pano Member

    Joined:
    Dec 14, 2016
    Posts:
    83
    SnortySnoopy and HW. like this.
  3. SnortySnoopy

    SnortySnoopy Member

    Joined:
    Apr 25, 2018
    Posts:
    186
    First of all, thank you for responding. I really appreciate the assistance. :)

    So;
    1. Even if my target is 28, or in your case 27, retaining the "-v26" as the folder name is alright. - Good to know, then I won't have to rename it to match all the time.
    2. Ok, so I'll have to adjust the icon px size for background and foreground to the sizes shown in post by HW.
    One last question, if we do all these through the "%ProgramData%" directory, will we still need to provide icon images in GMS's options -> android -> icons ?

    Thank you very much.
     
    Last edited: Oct 5, 2018
  4. HW.

    HW. Member

    Joined:
    May 21, 2017
    Posts:
    198
    Yes, you should. It will be used by devices using API 25- and below if you support it btw as your minimum API device. But the size is different, it is 48dp or in pixels (up to 192px) as required on IDE. While the adaptive icons uses 108dp (up to 432px) for both back/foreground icons.
     
    SnortySnoopy likes this.
  5. SnortySnoopy

    SnortySnoopy Member

    Joined:
    Apr 25, 2018
    Posts:
    186
    Ah yes, you're right, since the min API I set was 19, completely slipped from my mind. LOL.
    Thank you very much for making this issue clear. :D

    It's back to the drawing board then.

    Edit:

    Just a quick update.
    Thanks to the both of you, I've managed to make and implement this requirement into my app, and tested it working as intended using API 28 emulator. That said, the updated APK is now live on GPS.:D:cool:
     
    Last edited: Oct 5, 2018
    Pano likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice