{ "id": "173685", "key": "TIMOB-27110", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2019-11-01T16:55:00.000+0000", "created": "2019-05-29T12:29:59.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2019-11-01T16:55:00.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "The customer have a list view which is going to have different items.Each item has some elements including some labels and a progress bar. The main problem is with progress bar.\r\n\r\nWhen assign a value to the \"value\" property of the progress bar in the .tss file, It works properly and shows the value which have assigned.But in this case the value of progress bar is static. to make it dynamic assigned a \"bindId\" for progress bar. using that \"bindId\" try to change its value when making an item. but it doesn't work. other properties are accepted like assigning \"color\", \"message\" but the \"value\" property is not accepted.\r\n\r\n*Test Environment:*\r\n\r\nAppcelerator Command-Line Interface, version 7.0.11\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\n CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nTitanium SDK\r\n SDK Version = 8.0.1.GA\r\n\r\n Device: Huawei GR3 2017(Android 7)\r\n\r\n*Sample code:*\r\n\r\n*index.js*\r\n{code}\r\n$.index.open();\r\n\r\nvar items = [];\r\nvar numbers = [20, 40, 60, 80, 100];\r\n\r\nfor(i in numbers){\r\n\t\r\n\titems.push({\r\n\t\tprogress: {\r\n\t\t\tvalue: numbers[i],\r\n\t\t\tmessage: numbers[i].toString()+'%',\r\n\t\t}\r\n\t});\r\n\t\r\n}\r\n\r\n$.section.items = items;\r\n\r\n\r\n{code}\r\n\r\n*index.tss*\r\n\r\n{code}\r\n\r\n\"#progress\":{\r\n\r\n\ttop: '20dp',\r\n\t// bottom: 10,\r\n\twidth: '90%',\r\n\tmin: 0,\r\n\tmax: 100,\r\n\tcolor: '#419fd9',\r\n\tvalue:60,\r\n\tfont: {\r\n\t\tfontSize: 14,\r\n\t\tfontWeight: 'bold'\r\n\t}\r\n}\r\n\r\n\r\n{code}\r\n\r\n*index.xml*\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\r\n{code}", "attachment": [ { "id": "66650", "filename": "Screenshot_20190529-161303.png", "author": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-05-29T12:28:59.000+0000", "size": 60495, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Progress bar value is not working dynamically", "creator": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmitro", "key": "rmitro", "displayName": "Rakhi Mitro", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "450837", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I haven't tested the attached code... but... I do know there is a bug on Google's end where the native view won't always draw the given progress value. Even though Google has claimed to have fixed it, I'm still able to reproduce it in Android 9.0.\r\nhttps://issuetracker.google.com/issues/36923384\r\nhttps://www.google.com/search?q=android+setProgress+bug+site:stackoverflow.com\r\n\r\nI've seen this issue happen when setting the progress value before the view gets attached to the activity window, which I suspect is happening in the case of a ListView (or TableView) since rows and their child views are typically pre-configured before being added to the ListView. And this is what will definitely happen when scrolling rows in/out of the window (ie: rows scrolled out of the window are removed and when they're scrolled back in they are re-added). The only known native work-around that I'm aware of is to set the progress value after they're shown on screen. If you have a short list whose rows are never scrolled offscreen, then setting the progress value in your window's \"open\" even will do the trick. However, if it is a short ListView as shown in the screenshot, then I suggest that you don't use a ListView at all and use a ScrollView instead.\r\n", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-08-26T18:08:29.000+0000", "updated": "2019-08-26T18:08:29.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }