Titanium

[TIMOB-28561] Android: ListView fails to apply i18n "textid" and "titleid" properties on off-screen list items

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2021-10-22T18:35:19.000+0000
Affected Version/sRelease 10.0.1
Fix Version/sRelease 10.1.1
ComponentsAndroid
LabelsListView, android, i18n, localization, regression, textid, titleid
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-10-19T00:35:18.000+0000
Updated2021-11-17T10:55:11.000+0000

Description

*Summary:* As of Titanium 10.0.1, Android's 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 using textid and titleid, use the Ti.Locale.getString() method instead and assign the returned value to the view's text or title property.

Attachments

FileDateSize
ListViewTemplateLocalizationTest.js2021-10-19T00:31:15.000+00001217
strings-en.xml2021-10-19T00:32:51.000+00003183
strings-es.xml2021-10-19T00:32:51.000+00003423

Comments

  1. Ewan Harris 2021-11-17 Backport PR: https://github.com/appcelerator/titanium_mobile/pull/13181

JSON Source