feat(): local icon handling in actionbar and tabview - #7009
Merged
Merged
Conversation
MartoYankov
force-pushed
the
myankov/android-icons
branch
from
March 8, 2019 14:09
0d711d3 to
4206704
Compare
MartoYankov
force-pushed
the
myankov/android-icons
branch
from
March 11, 2019 11:48
c69fe70 to
89c96c8
Compare
Contributor
|
test ios#/tns-dist/tns-ios/PR/e34f49eb5af64946cf1257bd2b39760518235427/tns-ios.tgz |
manoldonev
reviewed
Mar 12, 2019
| } else if (item.icon) { | ||
| const img = loadActionIconFromFileOrResource(item.icon); | ||
| barButtonItem = UIBarButtonItem.alloc().initWithImageStyleTargetAction(img, UIBarButtonItemStyle.Plain, tapHandler, "tap"); | ||
| const image = img.imageWithRenderingMode(this._getIconRenderingMode()); |
Contributor
There was a problem hiding this comment.
Guard the img usage as here
manoldonev
approved these changes
Mar 12, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR Checklist
What is the current behavior?
On Android, icons rendered in TabView and Actionbar are not scaled correctly due to the use of a deprecated native Android constructor https://developer.android.com/reference/android/graphics/drawable/BitmapDrawable#BitmapDrawable(android.graphics.Bitmap).
On iOS, there was no property on ActionBar to specify icon rendering mode and it is hard coded to
alwaysOriginal, which made the use of image icons limited.What is the new behavior?
Fixed the Android issue with the use of the new constructor.
Added
iosIconRenderingModeon ActionBar. To avoid breaking changes, on ActionBar this property defaults toalwaysOriginaland on TabView, it defaults toautomatic. We should probably change this for 6.0.Fixes #5887
Tests