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-10358: Android: ImageView parity for scaling behavior #3937
Conversation
// Use the parent's width when it's fill | ||
requestedWidth = TiConvert.toTiDimension(parentView.getMeasuredWidth(), TiDimension.TYPE_WIDTH); | ||
} else { | ||
requestedWidth = TiConvert.toTiDimension(d, TiC.PROPERTY_WIDTH, TiDimension.TYPE_WIDTH); | ||
} | ||
view.setWidthDefined(true); |
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.
if (!TiC.LAYOUT_SIZE.equals(widthProperty) && !TiC.SIZE_AUTO.equals(widthProperty)) {
view. setWidthDefined(true)
}
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.
Auto has been deprecated a long time, so I didn't check for that here. I'll change it to check for size.
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.
It's been deprecated for a while (since 2.0). AFAIK, however, we haven't announced removing support for it.
We released 2.0 in April 2012, so 3.1 would be the earliest release we could remove it in per the 1-year-rule.
Code reviewed. The methods setWidthDefined and setHeightDefined seem to be called for different scenarios. Added comments based on my understanding of the code. |
Code updated, ready for review again. |
Accepting this PR. Found a few places where we do not check for OOM but that will be addressed in a separate PR #3936. ACCEPTED |
TIMOB-10358: Android: ImageView parity for scaling behavior
https://jira.appcelerator.org/browse/TIMOB-10358
Test case in Jira. Please also test
https://jira.appcelerator.org/browse/TIMOB-11640 and https://jira.appcelerator.org/browse/TIMOB-3887