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

TIMOB-10358: Android: ImageView parity for scaling behavior #3937

Merged
merged 4 commits into from Mar 7, 2013

Conversation

ayeung
Copy link
Contributor

@ayeung ayeung commented Mar 6, 2013

@ghost ghost assigned vishalduggal Mar 6, 2013
// 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);
Copy link
Contributor

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)
}

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@vishalduggal
Copy link
Contributor

Code reviewed. The methods setWidthDefined and setHeightDefined seem to be called for different scenarios. Added comments based on my understanding of the code.

@ayeung
Copy link
Contributor Author

ayeung commented Mar 7, 2013

Code updated, ready for review again.

@vishalduggal
Copy link
Contributor

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

vishalduggal added a commit that referenced this pull request Mar 7, 2013
TIMOB-10358: Android: ImageView parity for scaling behavior
@vishalduggal vishalduggal merged commit 7b8f3f0 into tidev:master Mar 7, 2013
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

3 participants