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-25223] Android: Fix remaining height calculation #9397

Closed
wants to merge 1 commit into from

Conversation

garymathews
Copy link
Contributor

  • Fix remaining height calculation of child views
TEST CASE
var win = Ti.UI.createWindow({
		backgroundColor: 'gray'
	}),
	list = Ti.UI.createListView(),
	section = Ti.UI.createListSection({
		items: [
			{properties: {title: 'Square'}},
			{properties: {title: 'Circle'}},
			{properties: {title: 'Triangle'}}
		]
	}),
	view = Ti.UI.createView({
		width: Ti.UI.FILL,
		height: Ti.UI.FILL,
		backgroundColor: 'green'
	});

list.setSections([section]);
win.add([list, view]);

win.open();
  • Should see a green square

JIRA Ticket

@jquick-axway
Copy link
Contributor

@garymathews, this code change creates new issues with "vertical" layouts when using FILL heights or pinned heights. But this is definitely the right solution for "composite" layouts. We need to calculate a remaining height for both vertical and horizontal layouts, but the remaining height should always be set to the view's height for "composite" layouts since it isn't applicable in that case. Good find (and my bad). It saved me time in isolating this issue.

I just pushed PR #9403 which solves both [TIMOB-25223] and [TIMOB-25221] regressions in one shot.

Side Note:
From now on, I'll be pushing QE to go through all of the layout test projects I've written if we make a layout code change. Even if it's a small code change. This is to avoid regressions in the future. So, to save QE's time, I wanted to combine these 2 regression fixes into 1.

@garymathews
Copy link
Contributor Author

@jquick-axway Closing, resolved in #9403

👍

@garymathews garymathews closed this Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants