[AC-788] textid is not working after Label is shown
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2014-06-16T07:24:29.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | label, text, textid |
| Reporter | Matej |
| Assignee | Steven Scott |
| Created | 2014-06-13T20:23:18.000+0000 |
| Updated | 2016-03-08T07:37:03.000+0000 |
Description
It is not possible to set up a new textid after a Label is shown however a property text does work.
app.js
var win = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var label = Ti.UI.createLabel({
text: "Label",
backgroundColor: "blue"
});
win.add(label);
win.open();
setTimeout(function() {
label.textid = "new_text";
//label.text = L("new_text"); // Does work
}, 1000);
i18n (strings.xml)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="new_text">New Text</string>
</resources>
Comments
- Matej 2014-06-13
- Shuo Liang 2014-06-16