-
-
Notifications
You must be signed in to change notification settings - Fork 23
Android Adaptive Icon #363
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mortend
requested changes
Oct 2, 2020
Awesome initiative on making the tutorial. Kudos! |
a2cc8ca
to
f85e6ff
Compare
mortend
reviewed
Oct 2, 2020
d51c82d
to
f877190
Compare
mortend
reviewed
Oct 2, 2020
Tutorial: https://medium.com/@andrewq/how-to-use-fuse-open-android-adaptive-icons-6778c41d6b82 Added support for defining an adaptive icon - still allows legacy definition - added default fuse open adaptive icon Notes: - adaptive icons are only visible in API 26+ (Oreo 8.0.0) - each icon(foreground/background) must be 108dp*108dp - easiest solution to get going is to design svg's, then use Android Studio 3's new wizard to generate your image assets: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive - in the wizard, you need to name your image asset "icon", then copy over the assets to your fuse project. .unoproj Usage: At a minimum, need to set Android.Icons.AdaptiveIconEnabled to true to see the default adaptive icon. ``` "Android": { "Icons": { "MDPI": "Assets/Icons/Android/mipmap-mdpi/icon.png", "HDPI": "Assets/Icons/Android/mipmap-hdpi/icon.png", "XHDPI": "Assets/Icons/Android/mipmap-xhdpi/icon.png", "XXHDPI": "Assets/Icons/Android/mipmap-xxhdpi/icon.png", "XXXHDPI": "Assets/Icons/Android/mipmap-xxxhdpi/icon.png", "ANYDPI_v26": "Assets/Icons/Android/mipmap-anydpi-v26/icon.xml", "foreground": "Assets/Icons/Android/drawab 8000 le/icon_foreground.xml", "background": "Assets/Icons/Android/drawable/icon_background.xml", "MDPI_Round": "AppStoreAssets/Icons/Android/mipmap-mdpi/icon_round.png", "HDPI_Round": "AppStoreAssets/Icons/Android/mipmap-hdpi/icon_round.png", "XHDPI_Round": "AppStoreAssets/Icons/Android/mipmap-xhdpi/icon_round.png", "XXHDPI_Round": "AppStoreAssets/Icons/Android/mipmap-xxhdpi/icon_round.png", "XXXHDPI_Round": "AppStoreAssets/Icons/Android/mipmap-xxxhdpi/icon_round.png", "ANYDPI_v26_Round": "AppStoreAssets/Icons/Android/mipmap-anydpi-v26/icon_round.xml" } }, ``` To enable the adaptive icon, you must add `-DUSE_ADAPTIVE_ICON` or `-DUSE_ROUND_ADAPTIVE_ICON` to your build command. e.g. `uno build -t=android -DUSE_ADAPTIVE_ICON`
f877190
to
487d088
Compare
Made an option for the round masking: |
mortend
approved these changes
Oct 4, 2020
For information: It's possible provide defines in the project file. "Android": {
"Defines": [
"USE_ADAPTIVE_ICON",
"USE_ROUND_ADAPTIVE_ICON"
],
"Icons": {
/* ... */
}
} |
Oh right, forgot about that, cool will include it in the tutorial too. |
mortend
added a commit
to mortend/uno
that referenced
this pull request
Dec 24, 2020
We forgot to add these files to our project in fuse-open#363.
mortend
added a commit
to mortend/uno
that referenced
this pull request
Dec 26, 2020
We forgot to add these files to our project in fuse-open#363.
mortend
added a commit
to mortend/uno
that referenced
this pull request
Dec 26, 2020
We forgot to add these files to our project in fuse-open#363.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tutorial: https://medium.com/@andrewq/how-to-use-fuse-open-android-adaptive-icons-6778c41d6b82
Added support for defining an adaptive icon
Notes:
.unoproj Usage:
At a minimum, need to set Android.Icons.AdaptiveIconEnabled to true to see the default adaptive icon.
To enable the adaptive icon, you must add
-DUSE_ADAPTIVE_ICON
or-DUSE_ROUND_ADAPTIVE_ICON
to your build command. e.g.uno build -t=android -DUSE_ADAPTIVE_ICON