Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14079] iOS: Left positioning on Label inside HeaderView of a TableViewSection not working

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterQuoc Huy
AssigneeUnknown
Created2013-05-21T20:50:15.000+0000
Updated2018-02-28T20:03:40.000+0000

Description

*Problem* From the test case below, the "left: 12" works great on .leftTableRowLabel and I can see the 12 pixel margin on the left of each label of that section, but the same does not work for .leftTableSectionHeaderLabel which is a Label of a HeaderView inside a TableViewSection. So the text inside the tableviewsection is stuck on the left side of the screen. *Steps to reproduce* 1. Create a new Default Alloy Project 2. Replace contents with test case below 3. Run on iOS and see that the left property has no effect on the HeaderView label *index.xml*
<Alloy>
	<Window id="leftWindow">
		<TableView id="leftTable">
			<TableViewSection class="leftTableSection">
				<HeaderView class="leftTableSectionHeader">
					<Label class="leftTableSectionHeaderLabel">Browse</Label>
				</HeaderView>
				<TableViewRow class="leftTableRow">
					<Label class="leftTableRowLabel">Elem1</Label>
				</TableViewRow>
				<TableViewRow class="leftTableRow">
					<Label class="leftTableRowLabel">Elem2</Label>
				</TableViewRow>
			</TableViewSection>
			<TableViewSection class="leftTableSection">
				<HeaderView class="leftTableSectionHeader">
					<Label class="leftTableSectionHeaderLabel">Browse 2</Label>
				</HeaderView>
				<TableViewRow class="leftTableRow">
					<Label class="leftTableRowLabel">Elem3</Label>
				</TableViewRow>
				<TableViewRow class="leftTableRow">
					<Label class="leftTableRowLabel">Elem4</Label>
				</TableViewRow>
			</TableViewSection>
		</TableView>
	</Window>
</Alloy>
*index.tss*
"#leftTable": {
	separatorColor: "#454545",
	backgroundColor:"#555555"
}

".leftTableSectionHeaderLabel": {
	backgroundColor: "#666666",
	color: "white",
	height: 25,
	left: 12
}

".leftTableRowLabel": {
	backgroundColor: "#555555",
	height: 35,
    color: "#ebebeb",
    left: 12
}
*index.js*
$.leftWindow.open();

Comments

  1. Daniel Sefton 2013-05-31

    Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and 3.2 CI.

JSON Source