Skip to content

Snoy-Kuo/android_adaptive_icon_example

Repository files navigation

adaptive_icon_example

An Android example App project that shows how to check adaptive icons fit the official guidelines.

How to create adaptive launcher icons?

  1. Choose a vector image design tool which can export SVG formot file (eg. Illustrator, Adobe XD, Affinity, Sketch, Figma).
  2. Create a canvas with width and height 108px. If it's too small, you can create a 10x canvas.
  3. Create a top layer. Import adaptive icon mask lines to ensure safe area.
  4. Craete a background layer and then draw background.
  5. Create a foreground layer and then draw foreground.
  6. Export foreground and background SVG files. Note, some SVG tags are unsoffort for converting to Vector Drawable. These objects should frist convert to Paths in SVG.
  7. In Android Studio, create new Vector Assets. Convert foreground and background SVG files to Vector Drawable format files.
  8. In Android Studio, create new Image Asset. Choose Icon Type="Launcher Icons(Adaptive and legacy)". Choose source assets for foreground and background layers.

Which icon shows in which target?

  • Android 8 (API 26, O) or above : Adaptive launcher icons in mipmap-anydpi-v26 folder.
  • Android 7.1.1 (API 25, N_MR1) : android:roundIcon and android:icon in mipmap folders.
  • Android 7 (API 24, N) or below : android:icon in mipmap folders.

Dev env

  • macOS 12.2.1 (Monterey) x64
  • Android Studio Bumblebee Patch 2
  • Android SDK version 32
  • JDK: 11
  • Gradle: 7.2
  • Kotlin: 1.6.10

References

Todos

  • Find an easier way to launch Vector Assets Studio and Image Asset Studio for designers.
    Since there is no standalone Vector Assets Studio and Image Asset Studio program.

About

An Android example App project that shows how to check adaptive icons fit the official guidelines.

Topics

Resources

License

Stars

Watchers

Forks

Languages