Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adaptive icon support #714

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

lokesh-krishna
Copy link
Contributor

@lokesh-krishna lokesh-krishna commented May 28, 2018

This adds the new icon from #638 but now with support for adaptive icons on devices running Android 8.0 or higher. The new icon in the shape of a rounded square is used as the legacy icon to be shown on devices running older versions of Android.

The icons have been moved from the drawables directories to mipmap directories as recommended here.

This is what the new icon looks like on legacy devices:

ic_launcher

The adaptive icon looks different depending upon the mask used by the launcher or selected by the user:
screenshot_2018-05-28 adapticon 4
screenshot_2018-05-28 adapticon 5
screenshot_2018-05-28 adapticon 6
screenshot_2018-05-28 adapticon 7

As discussed earlier, we'll need to add credits for Michael Cook in About.
I hope it is okay to have updated the readme icon as well in this same PR.

We will need to build against SDK 26 in order to support adaptive icons though we don't need to target API 26.

@Nuntius0
Copy link

Nuntius0 commented Aug 4, 2018

The build fails because it can't find @mipmap/ic_launcher as specified in the manifest, because it only looks in main/res for mipmaps. If you move the mipmap folder there, it'll works.

As far as I understand it, the different resource folders are only ever used to provide a different icon for the debug flavour. What about unifying all those, and specifying the right app icon to be used in gradle?
That would a) fix this issue, and would b) clean up the folder structure.
https://stackoverflow.com/questions/22875948/how-to-provide-different-android-app-icons-for-different-gradle-buildtypes

@lokesh-krishna
Copy link
Contributor Author

I would like to hear what the devs think about this. Should I move the mipmap folder or would it be a better solution to clean up the folder structure?

@Kdecherf
Copy link
Member

@Strubbl any thoughts?

@Kdecherf Kdecherf requested a review from Strubbl August 19, 2018 19:02
Copy link
Contributor

@Strubbl Strubbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it very much, that you give credits to Michael in the Readme.

I like the approach @Nuntius0 is describing. A cleanup of the folder struture w.r.t. the icons sounds good to me.
Let's go for that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants