I'm making an app with Kivy. In buildozer, I specify the icon that's used on android as follows:
# (str) Icon of the application
icon.filename = %(source.dir)s/icon.png
The challenge is that for pixels (and maybe others, I don't know), the icon is round, and the approach is to squeeze it in rather than crop it.
For example, if my icon.png were this:
the icon on the screen looks like this:
but it would be better if it were cropped to fit like this:
Any ideas how to do this?
The answer is much easier than the above comments would suggest.
The latest buildozer.spec has the following lines:
# (str) Adaptive icon of the application (used if Android API level is 26+ at runtime)
# icon.adaptive_foreground.filename = %(source.dir)s/data/icon_fg.png
# icon.adaptive_background.filename = %(source.dir)s/data/icon_bg.png
Simply, comment out and replace with your own foreground and background images. Works perfectly.
I did get the Android Studio Asset Studio working. On mine, you open a project, go to app-res, right-click, new-Image Asset (see screenshot).
It works, and I could generate the images as per the blog linked above, but following the rest of the instructions and buildozer-ing did not yield a good result (default icon was used in the emulator). Could be user error, but I stopped trying when I realized you could just edit the additional line in buildozer.spec.