Blueprint icon indicating copy to clipboard operation
Blueprint copied to clipboard

Add support for moto launcher

Open aagu opened this issue 2 years ago • 9 comments

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.

aagu avatar Sep 11 '22 10:09 aagu

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

welcome[bot] avatar Sep 11 '22 10:09 welcome[bot]

@aagu thanks for the contribution.

  • Are you sure the app won't work if we keep using drawableRes? Blueprint isn't the one in charge of loading icons for launchers. Blueprint only loads them for Blueprint itself
  • If it really is necessary, where is this new drawableOrMipmapRes function? I don't see it in the modified files

jahirfiquitiva avatar Sep 11 '22 15:09 jahirfiquitiva

@jahirfiquitiva Thanks for the comment!

  • According to the decomplied icon pack which is made by Motorola, icons are placed in mipmap. I will try to find out whether put icons into drawable works for moto app launcher.
  • I've re-push my code to fix the missing drawableOrMipmapRes function. Thanks again.

aagu avatar Sep 12 '22 08:09 aagu

@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.

aagu avatar Sep 13 '22 01:09 aagu

@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

jahirfiquitiva avatar Sep 13 '22 01:09 jahirfiquitiva

@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
Free, feature-rich, easily customizable Android dashboard for icon packs - GitHub - aagu/Blueprint at shaper

aagu avatar Sep 13 '22 04:09 aagu

@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.

jahirfiquitiva avatar Sep 13 '22 20:09 jahirfiquitiva

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

aagu avatar Sep 14 '22 04:09 aagu

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

aagu avatar Sep 15 '22 13:09 aagu

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

Talaxy009 avatar Nov 02 '22 13:11 Talaxy009

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

welcome[bot] avatar Feb 24 '23 03:02 welcome[bot]