[ALOY-954] <ItemTemplate> sometimes not applied properly to <ListView>
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2014-02-11T15:43:19.000+0000 |
Affected Version/s | Alloy 1.3.1 |
Fix Version/s | 2014 Sprint 03 |
Components | Styling, XML |
Labels | n/a |
Reporter | Tim Statler |
Assignee | Unknown |
Created | 2014-02-11T01:38:06.000+0000 |
Updated | 2018-03-07T22:25:39.000+0000 |
Description
In attached Alloy project the the from another file it works -- that is, if you uncomment the require and comment out the previous code.
<ItemTemplate>
is applied correctly when I <require>
it into a ListView
. But when the same code is "manually" added to the ListView it doesn't render as expected..
In attached project, when I run the following code, the row is not formatted correctly (see attached, image1.png).
<Templates>
<!-- <Require src="itemtemplate"></Require> -->
<ItemTemplate name="itemtemplate" height="70">
<ImageView id="leftImage" bindId="leftImage"/>
<Label id="title" bindId="title"/>
<Label id="subtitle" bindId="subtitle"/>
<ImageView id="rightImage" bindId="rightImage"/>
</ItemTemplate>
</Templates>
<ListSection>
<ListItem template="itemtemplate" leftImage:image="/images/alien.png" rightImage:image="/images/up.png" title:text="Alien" subtitle:text="In space, no one can hear you scream"/>
</ListSection>
But if I
<Templates>
<Require src="itemtemplate"></Require>
</Templates>
Expected: Runtime behavior should be identical.
Attachments
File | Date | Size |
---|---|---|
listitem_template.zip | 2014-02-11T01:39:26.000+0000 | 6081504 |
[~tstatler] I notice you mentioned Alloy 1.3.1 was the problem? Does this issue exist with 1.3.0? Trying to determine if this is a regression.
I can't reproduce this. SDK: 3.2.0.GA.d9182d6 CLI: 3.2.1 Alloy: 1.3.1 I did copy the contents of itemtemplate.tss into the index.tss, otherwise the images and labels are all centered in the listitem. However, even without that, the template is being applied, and the listitem details are being properly set whether I include the template inline or via Require.
Sorry for the version mixup. But I still can't reproduce using 3.2.1.GA. It works fine for me, with TSS changes noted above, with the template included directly in the index.xml.