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-25173] Android: Modified layouts to behave more like iOS. #9320
Conversation
- Changed Android to resolve Size/Fill layout conflicts like iOS and Windows. * Note: Only an issue if parent uses Ti.UI.SIZE and child uses Ti.UI.FILL. * Android used to shrink the parent to fit the min size allowed by the child. * Now increases the size of the child to fill the parent's parent, like iOS/Windows. - Fixed horizontal layouts where views using FILL width would wrongly wrapped to next row. * Only an issue if another view is already in the row. (Resulting FILL width was too big.) - Fixed layouts to prioritize size defined by view's top/left/bottom/right/center properties over FILL and SIZE. * Only applies if at least 2 coordinate properties were provided. * Now matches iOS' behavior. - Constrained child view width to parent's max width like iOS when using wrapping horizontal views. - This commit also resolves the following layout issues: * TIMOB-12996 * TIMOB-15097 * TIMOB-17628 * TIMOB-17984 * TIMOB-19536 * TIMOB-19598 * TIMOB-19814
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.
There is a new horizontal wrapping bug with views using Ti.UI.SIZE where they are constrained by the parent's remaining width instead of the parent's full width. This was discovered while testing with PR #9073 test case. We've also discovered an issue where the child view's left/center/right properties are not being used to calculate its width within a horizontal layout. iOS does this, but Android does not. This is not a new bug (existed before my code changes). I plan on adding fixes for the above to this PR in the near future. |
…t/right/top/bottom/center properties to work like iOS. - Now supports setting view width/height based on position properties relative to parent's remaining space. - Also fixed horizontal wrapping regression introduced in last commit. * Views using Ti.UI.SIZE were wrongly using row's remaing space instead of view's desired width.
The 2 issues have been fixed. @mukherjee2, can you resume testing please? |
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.
CR: PASS
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.
Passes FR. Details are in PR 9321.
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.
Passes FR. Details are in PR 9321.
JIRA:
https://jira.appcelerator.org/browse/TIMOB-25173
Also resolves the following JIRA cases...
Summary:
Tests:
HorizontalFillTest.js
HorizontalPinningTest.js
ListViewFillTest.js
SizeFillConflictTest.js
VerticalFillTest.js