jahirfiquitiva / Blueprint

Free, feature-rich, easily customizable Android dashboard for icon packs
https://dashbud.dev
Other
714 stars 137 forks source link

Add support for moto launcher #297

Closed aagu closed 1 year ago

aagu commented 2 years ago

Description

This pr adds support for moto app launcher. Moto app launcher is the preinstalled launcher app for the MYUI variant of Android developed by Motorola.

Motivation

Moto app launcher only supports adaptive icons and reads resources from mipmap instead of drawable. So we need to add support for reading resources from mipmap when trying to load all icons by the icon pack. Further more, I've re-written the package resolving logic a bit by removing magic number and use pre-defined constant to replace hardcode string.

welcome[bot] commented 2 years ago

Thanks so much for opening your first PR here :smiley:. Please be sure to check the contribution guidelines! :wink:

jahirfiquitiva commented 2 years ago

@aagu thanks for the contribution.

aagu commented 2 years ago

@jahirfiquitiva Thanks for the comment!

aagu commented 2 years ago

@jahirfiquitiva I tried to put the xml with adaptive icon definition into drawable, moto app launcher did not load icon for that app. So, I think we have to support read icons from mipmap for adding support to moto app launcher. Besides, I will try to add a section to wiki to describe how to add support for moto app launcher to identify icons.

jahirfiquitiva commented 2 years ago

@aagu do you have an example app in a repository? mind sharing a link to it?

also, yeah, probably Moto Launcher only reads the icons from mipmap, but Blueprint does not need that as it will read them from drawable and it will work normally in Blueprint, so please revert the changes to use that function

aagu commented 2 years ago

@aagu do you have an example app in a repository? mind sharing a link to it?

@jahirfiquitiva Sure, please take a look at the shaper branch of my fork. https://github.com/aagu/Blueprint/tree/shaper

also, yeah, probably Moto Launcher only reads the icons from mipmap, but Blueprint does not need that as it will read them from drawable and it will work normally in Blueprint, so please revert the changes to use that function

I totally got you, but I think it is duplicate to put icons both in drawable and mipmap, so I'd like to let Bulueprint support reading icons from mipmap. What do you think about that?

GitHub
GitHub - aagu/Blueprint at shaper
Free, feature-rich, easily customizable Android dashboard for icon packs - GitHub - aagu/Blueprint at shaper
jahirfiquitiva commented 2 years ago

@aagu I understand your concern but even if Blueprint reads icons from mipmap, all the other launchers, except Moto, will read them from drawable, and icons will still have to be duplicated.

Therefore, to make it easy to setup for the majority of launchers, I'd prefer to keep icons in drawable and read from drawable only.

If people want to add support for that Moto Launcher, they can just duplicate their icons in mipmap, otherwise they can still support the big majority of launchers without doing that extra step.

aagu commented 2 years ago

@jahirfiquitiva That makes sense, I will revert the change of icons loading once I get some spare time. 😃

aagu commented 2 years ago

@jahirfiquitiva I have removed the drawableOrMipmapRes funtion and related codes. Feel free to review when you have time, thanks !

Talaxy009 commented 1 year ago

Hope this can be merged, as moto users we really need this!

welcome[bot] commented 1 year ago

Congrats on merging your first pull request here! :tada: How awesome!