{ "id": "127630", "key": "TIMOB-16629", "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": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-01-09T22:17:40.000+0000", "created": "2014-03-13T17:14:27.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-09T22:17:40.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": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Trying to Add one View with Indicator on ListView by using add() function\r\n\r\n\r\n\r\n//-------- CODE ----------------\r\n{code}\r\nvar Wv = Ti.UI.createView({\r\n backgroundColor: 'yellow',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n //top:0,left:0,right:0,bottom:0, //Try it but does not work\r\n});\r\n\r\n\r\nvar style;\r\nif (Ti.Platform.name === 'iPhone OS'){\r\n style = Ti.UI.iPhone.ActivityIndicatorStyle.DARK;\r\n}\r\nelse {\r\n style = Ti.UI.ActivityIndicatorStyle.DARK;\r\n}\r\nvar Indicator = Ti.UI.createActivityIndicator({\r\n\t\tcolor: 'black',\t\t\r\n\t\tmessage: ' '+ 'Loading...Please wait...',\r\n style: style,\r\n\t\t\r\n});\r\nWv.add(Indicator);\r\n\r\nIndicator.show();\r\n\r\nvar ListView = Ti.UI.createListView({\r\n backgroundColor: 'white',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n //top:0,left:0,right:0,bottom:0, \r\n});\r\n\r\nListView.add(Wv);\r\n\r\nvar win = Ti.UI.currentWindow;\r\n\r\nwin.add(ListView);\r\n{code}\r\n\r\n\r\n//----------- END CODE -----------\r\nThe Wv View always shows at Position: (0,0), and does not fill out on ListView.\r\nIt works on iPhone/iOS Simulator and Device\r\nbut It does not work on Android", "attachment": [ { "id": "46608", "filename": "Android.png", "author": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "created": "2014-03-13T17:14:27.000+0000", "size": 82445, "mimeType": "image/png" }, { "id": "46609", "filename": "iOS .png", "author": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "created": "2014-03-13T17:14:27.000+0000", "size": 16836, "mimeType": "image/png" }, { "id": "46655", "filename": "Screen Shot 2014-03-13 at 10.43.27 PM.png", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-14T05:43:56.000+0000", "size": 22834, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: Adding a View/ImageView with Ti.UI.FILL width and height to ListView does not work", "creator": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "environment": "Android: 4.4.2\r\nDevice: Nexus 4\r\nSDK: 3.2.0 /3.2.1/3.2.2\r\n", "comment": { "comments": [ { "id": "297208", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I was not able to run your code as it is so I modified it to run but I cannot reproduce the same behavior on iOS or Android platform. Can you please provide a complete but simple test case to reproduce this issue? I am attaching my screenshot for iOS platform that is different from yours.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-14T05:43:22.000+0000", "updated": "2014-03-14T05:43:22.000+0000" }, { "id": "297392", "author": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "body": "Sorry Ritu, Just skip the Navigation Bar on the top of window. It's just another View that contains some button. \nI have edited my code to show indicator. \nThe yellow View fills to both width and height as expected on iPhone. but it does not fill to fit width and height on Android.", "updateAuthor": { "name": "anh.nguyen", "key": "anh.nguyen", "displayName": "Anh Nguyen", "active": true, "timeZone": "America/Chicago" }, "created": "2014-03-15T03:43:59.000+0000", "updated": "2014-03-15T03:43:59.000+0000" }, { "id": "297460", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce the issue with an updated test case. Note that if I add the view in the test case to window directly (instead of adding it to List View) then both iOS and Android behave same. So this issue is specific to ListView.\r\n\r\nUpdated test case\r\n{code}\r\nvar Wv = Ti.UI.createView({\r\n backgroundColor: 'yellow',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n //top:0,left:0,right:0,bottom:0, //Try it but does not work\r\n});\r\n\r\nvar style;\r\nif (Ti.Platform.name === 'iPhone OS'){\r\n style = Ti.UI.iPhone.ActivityIndicatorStyle.DARK;\r\n}\r\nelse {\r\n style = Ti.UI.ActivityIndicatorStyle.DARK;\r\n}\r\nvar Indicator = Ti.UI.createActivityIndicator({\r\n color: 'black', \r\n message: ' '+ 'Loading...Please wait...',\r\n style: style, \r\n});\r\n\r\nWv.add(Indicator);\r\n \r\nIndicator.show();\r\n\r\nvar ListView = Ti.UI.createListView({\r\n backgroundColor: 'white',\r\n width:Ti.UI.FILL,\r\n height:Ti.UI.FILL,\r\n //top:0,left:0,right:0,bottom:0, \r\n});\r\n \r\nListView.add(Wv);\r\n\r\nvar win = Ti.UI.createWindow();\r\nwin.add(ListView);\r\nwin.open();\r\n{code}\r\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-17T01:25:14.000+0000", "updated": "2014-03-17T01:25:14.000+0000" }, { "id": "321821", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces\r\n\r\nTitanium SDK version 3.4.0 master, 3.2.2.GA\r\nTitanium Studio, build: 3.3.0.201407100905\r\nTitanium Command-Line Interface\r\nCLI version 3.3.0, \r\nAndroid device : Motorola Moto G, Android version : 4.4.4\r\niOS simulator : iPhone Retina (3.5-inch), iOS 7.0.3", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-04T15:15:44.000+0000", "updated": "2014-09-04T15:15:44.000+0000" }, { "id": "453613", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. \r\n\r\nIf community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-09T22:17:40.000+0000", "updated": "2020-01-09T22:17:40.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }