Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 8.0.0, Release 7.5.1
-
Component/s: Android
-
Labels:
-
Environment:
Android 4.4.4
Titanium SDK 5.1.2
-
Story Points:5
-
Sprint:2016 Sprint 07 SDK, 2019 Sprint 1
Description
Issue Description
When the user scroll very fast some attributed strings are missing (See attached screenshots), this is not happening on normal labels and if you scroll back slowly the attributed strings are showed.
Steps to Reproduce
- Create a new default alloy project
- replace the views/index.xml with the next code:
<Alloy>
<Window class="container">
<ListView id="listView">
<Templates>
<ItemTemplate name="simpleLabel">
<Label bindId="label1" id="label1"/>
</ItemTemplate>
</Templates>
</ListView>
</Window>
</Alloy>
- Replace the controllers/index.js code with the next code:
var listSection = Ti.UI.createListSection();
var dataItems = [];
for (var i = 0; i < 100; i++) {
var data = {
template: "simpleLabel",
label1: {},
};
if (i % 2 === 1) {
data.label1.attributedString = Ti.UI.createAttributedString({
text: "Italic row row row" + i,
attributes: [
{
type: Ti.UI.ATTRIBUTE_FONT,
value: {
fontWeight: "normal",
fontStyle: "italic",
},
range: [0, 6],
}
]
});
} else {
//data.label1.text = "Normal";
data.label1.text="Normal" + i;
}
dataItems.push(data);
};
listSection.setItems(dataItems);
$.listView.setSections([listSection]);
$.index.open();
- Replace the code inside styles/index.tss with the next code:
".container": {
backgroundColor: "#fff",
layout: "vertical",
}
"#listView": {
height: Ti.UI.FILL,
width: Ti.UI.FILL,
}
"#label1": {
font: {
fontSize: 26,
},
color: "#000",
}
"Label": {
color: "#000",
font: {
fontSize: 30,
},
}
- Run
- Scroll fast and stop