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
timob-10080: Android: Parity for Ti.Blob methods #2833
Conversation
…arity with iOS.Reset image when width or height is changed in TiUIImageView class.
@@ -936,6 +936,25 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP | |||
} else { | |||
super.propertyChanged(key, oldValue, newValue, proxy); | |||
} | |||
|
|||
View parentView = getParentView(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand the point of this is to avoid having the line in two places, I think we should avoid hitting the getParentView() call every single time that propertyChange is called. Please move this inside the if and else if blocks so we only hit it when we need it.
Updated. Ready for review again. |
Updated code reviewed and minor comments left. |
@@ -936,6 +936,26 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP | |||
} else { | |||
super.propertyChanged(key, oldValue, newValue, proxy); | |||
} | |||
|
|||
if (key.equals(TiC.PROPERTY_WIDTH)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what we talked about, it looks like you want to do this in a separate 'if' block because you are relying on logic from the super class that deals with height/width. If that is the case, can we move this whole block into the 'else' statement above to make this more clear.
Also a comment on why you are doing this would be nice.
Spoke to Ping and she is going to make an additional performance optimization. |
Updated. Ready for review. |
Updated code reviewed and single comment left. |
… and filter when drawBitmap().
Updated. Ready for review. |
Code reviewed and functional test passed on both runtimes. Accepted |
timob-10080: Android: Parity for Ti.Blob methods
https://jira.appcelerator.org/browse/TIMOB-10080
Test steps in JIRA. Please also run the test cases in https://jira.appcelerator.org/browse/TC-1209 and https://jira.appcelerator.org/browse/TC-1210 since they are duplicates.