[TIMOB-28561] Android: ListView fails to apply i18n "textid" and "titleid" properties on off-screen list items
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-10-22T18:35:19.000+0000 |
| Affected Version/s | Release 10.0.1 |
| Fix Version/s | Release 10.1.1 |
| Components | Android |
| Labels | ListView, android, i18n, localization, regression, textid, titleid |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2021-10-19T00:35:18.000+0000 |
| Updated | 2021-11-17T10:55:11.000+0000 |
Description
*Summary:*
As of Titanium 10.0.1, Android's Create an
Create an
ListView fails to fetch localized strings for properties textid and titleid on a ListItem views that are scrolled into the screen. This causes them to fail to show any text. Only the initially displayed ListItems show localized text.
*Steps to reproduce:*
Create a Classic app project using [^ListViewTemplateLocalizationTest.js] as the "app.js".
Create an ./i18n/en folder and copy [^strings-en.xml] to it, renaming to strings.xml.
Create an ./i18n/es folder and copy [^strings-es.xml] to it, renaming to strings.xml.
Build and run on Android.
Scroll to the bottom.
Notice the rows and buttons contain no text as you scroll down. _(This is the bug.)_
*Work-Around:* Instead of usingtextid and titleid, use the Ti.Locale.getString() method instead and assign the returned value to the view's text or title property.
Attachments
| File | Date | Size |
|---|---|---|
| ListViewTemplateLocalizationTest.js | 2021-10-19T00:31:15.000+0000 | 1217 |
| strings-en.xml | 2021-10-19T00:32:51.000+0000 | 3183 |
| strings-es.xml | 2021-10-19T00:32:51.000+0000 | 3423 |
Backport PR: https://github.com/appcelerator/titanium_mobile/pull/13181