{ "id": "172225", "key": "AC-5887", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2019-01-08T16:07:54.000+0000", "created": "2018-09-14T15:52:21.000+0000", "labels": [], "versions": [], "issuelinks": [ { "id": "56790", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "171858", "key": "AC-5787", "fields": { "summary": "Android: DrawerLayout RTL Support in android 8", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-14T08:45:08.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Hello I've an app that can change language on tuntime, it works fine on my tablet (Android 6) but not on my smartphone that is Android 8, I found this article:\r\nhttps://www.reddit.com/r/androiddev/comments/8b2rol/solution_for_locale_language_change_not_working/\r\n\r\nAnd it seems to be an issue of android 8, what can we do?", "attachment": [ { "id": "65968", "filename": "thumbnail.jpeg", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T05:55:21.000+0000", "size": 11104, "mimeType": "image/jpeg" }, { "id": "65967", "filename": "thumbnail (1).jpeg", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T05:54:52.000+0000", "size": 9462, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Solution for Ti.Locale.setLanguage change not working in oreo 8.0", "creator": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "environment": null, "comment": { "comments": [ { "id": "441595", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, If this is a native Android issue, Then Android has to provide a fix on its update. There is not much we can do here I believe. We will keep it open for other developer having the same issue. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-09-15T22:00:35.000+0000", "updated": "2018-09-15T22:00:35.000+0000" }, { "id": "441598", "author": { "name": "ahmed.mohamed20320", "key": "ahmed.mohamed20320", "displayName": "Ahmed Mohamed", "active": true, "timeZone": "Africa/Cairo" }, "updateAuthor": { "name": "ahmed.mohamed20320", "key": "ahmed.mohamed20320", "displayName": "Ahmed Mohamed", "active": true, "timeZone": "Africa/Cairo" }, "created": "2018-09-16T02:55:20.000+0000", "updated": "2018-09-16T03:06:44.000+0000" }, { "id": "443980", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Doesn't seem to work correctly on Android 8.0.0, setting the textid directly does work. When you get a string with L('key') it doesn't work, what is strange is that it does seem to work when you run the app with liveview enabled. Is there something wrong with the L function?\r\n\r\nTest on: Samung s9 (Android 8.0.0) and emulator (Android 8.0.0, 6.0.0).\r\nSDK: 7.5.0.GA\r\n\r\nExample (does need to have the strings.xml file):\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar container = Ti.UI.createView({\r\n height: Ti.UI.SIZE,\r\n layout: 'vertical'\r\n});\r\n \r\nvar label1 = Ti.UI.createLabel({\r\n text: 'Current Locale: ' + Ti.Locale.currentLanguage + ' (' + L('hello_world') + ')',\r\n color: 'black'\r\n});\r\n\r\nvar label2 = Ti.UI.createLabel({\r\n textid: 'hello_world',\r\n color: 'black'\r\n});\r\n \r\nvar btn = Ti.UI.createButton({\r\n title: 'Change'\r\n});\r\n \r\nbtn.addEventListener('click', function () {\r\n var newLang = Ti.Locale.currentLanguage == 'de' ? 'en' : 'de';\r\n Ti.Locale.setLanguage(newLang);\r\n label1.text = 'Current Locale: ' + Ti.Locale.currentLanguage + ' (' + L('hello_world') + ')';\r\n label2.textid = 'hello_world';\r\n});\r\n \r\ncontainer.add(btn);\r\ncontainer.add(label1);\r\ncontainer.add(label2);\r\nwin.add(container);\r\n\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-11-28T07:31:23.000+0000", "updated": "2018-11-28T07:32:05.000+0000" }, { "id": "444373", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello [~Pietro],\r\n\r\nI just wanted to follow up with you about this issue? Are you still experiencing this problem?\r\nPlease let us know if you need more help with this issue.\r\n\r\n\r\nThanks\r\n", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-10T04:22:39.000+0000", "updated": "2018-12-10T04:22:39.000+0000" }, { "id": "444480", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I still have this problem on Android 8.0 and higher. It seems like it's just the L function (or Ti.Locale.getString) that is affected, setting textid on a label does seem to work (see sample above).", "updateAuthor": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-12-11T13:19:53.000+0000", "updated": "2018-12-11T13:19:53.000+0000" }, { "id": "444520", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nTested the issue on android 8 device and it seems worked for me. See the attachment section for output. You can also test again from [here |https://gist.github.com/rakhimonimitro/e0532a843926e1d996e964d87fd0d4ee] and let us know how it goes.\r\n\r\nThanks", "updateAuthor": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-12T06:08:06.000+0000", "updated": "2018-12-12T06:08:06.000+0000" }, { "id": "444527", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I've tested it with the sample you provided and it still doesn't work for me with liveview disabled, when I launch the app with liveview enabled it does work. When I disable liveview only the second label changes it's text.\r\n\r\nI've tested it on a Samsung S9 with Oreo an a simulator with Oreo.", "updateAuthor": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2018-12-12T08:14:43.000+0000", "updated": "2018-12-12T08:14:43.000+0000" }, { "id": "445003", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~teunklijn@telfort.nl], As rakhi posted before the issue works fine with Android 8.0. I tested the issue myself and got the same result. I was able to duplicate the behavior as rakhi. I got the same as the screenshots attached above. Tested with SDK 7.5.0.GA. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-01-04T23:18:49.000+0000", "updated": "2019-01-04T23:18:49.000+0000" }, { "id": "445269", "author": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "updateAuthor": { "name": "teunklijn@telfort.nl", "key": "teunklijn@telfort.nl", "displayName": "Teun Klijn", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2019-01-14T08:45:08.000+0000", "updated": "2019-01-14T08:45:08.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }