Back to Krita

Icons for Android source files

packaging/android/apk/res-src/NOTES.md

6.0.1.12.3 KB
Original Source

Icons for Android source files

These files are modified from /pics/branding/[flavors]/sc-apps-krita.svgz.

  • adaptive.svg is the completed version of the background and foreground extension according to the Designing Adaptive Icons.
    1. Remove the shadow from the canvas.
    2. Expand the canvas to the page boundaries and modify it to a rectangle, in order to center the pattern for the next steps.
    3. Expand the page to 1309px (calculated as 800/66*108px), center the pattern, and ensure that the original canvas is within the safe zone.
    4. Expand the rectangular canvas again to the page boundaries.
    5. Complete the brush shadow. This pattern can be copied from the brush with a rotation of approximately -2°.
  • background.svg and foreground.svg are the results of separating the background and foreground of adaptive.svg, for Android 8.0 and above.
  • legacy.svg is the same as logo, for Android 7.1 and below.

To generate icons, you need to use Android Studio's Image Assets and perform the following steps:

  1. Select Launcher Icons (Adaptive and Legacy) in Icon type and adjust the following configuration to generate adaptive icons for Android 8.0+.
    • Foreground Layer: /path/to/foreground.svg
    • Background Layer: /path/to/background.svg
    • Options
      • Legacy Icon: No
  2. Select Launcher Icons (Legacy only) in Icon type, and adjust the following configuration to generate irregular icons suitable for Android 7.1.2 and earlier versions.
    • Assets type: Image
    • Path: /path/to/legacy.svg
    • Trim: No
    • Shape: No

After the generation is complete, res/mipmap-anydpi-v26/ic_launcher.xml may be deleted. At this time, you can directly create a copy of ic_launcher_round.xml and rename it to ic_launcher.xml. Do not delete ic_launcher_round.xml!

Add the following code to ic_launcher.xml and ic_launcher_round.xml to support the themed app icon.

xml
<monochrome android:drawable="@drawable/ic_launcher_foreground" />

Convert all ic_launcher.png to ic_launcher.webp.

After all .webp files are generated, strip them from animation and ICC information using strip-webp-files.sh script (we expect the icons be in sRGB space anyway).