{ "id": "154785", "key": "TIMOB-20364", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-09-16T21:52:34.000+0000", "created": "2016-02-06T21:30:53.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "CardView", "android" ], "versions": [ { "id": "17072", "name": "Release 5.1.2", "archived": false, "released": true, "releaseDate": "2016-01-12" } ], "issuelinks": [], "assignee": null, "updated": "2019-09-16T21:52:34.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": "Where is red line?\r\n\r\n\r\n{code:xml}\r\n\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\n\r\nMy result:\r\n!CardView_bug.png|thumbnail!\r\n", "attachment": [ { "id": "58157", "filename": "CardView_bug.png", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2016-02-06T21:30:04.000+0000", "size": 77297, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: CardView can't display child view", "creator": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "subtasks": [], "reporter": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "environment": "Titanium SDK 5.1.2.GA and 6.0.0 / Genymotion emulator device 4.2.2", "comment": { "comments": [ { "id": "376192", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, Define a width of the child view. I have tried this, and it's working. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-07T06:18:14.000+0000", "updated": "2016-02-07T06:18:14.000+0000" }, { "id": "376193", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "Yes it work with specific constant value BUT:\r\n\r\n\r\n\r\nThis code not work (not visible). It is default value for view.width: [documentation|http://docs.appcelerator.com/platform/latest/#!/guide/Transitioning_to_the_New_UI_Layout_System-section-30088148_TransitioningtotheNewUILayoutSystem-AutoFillViews]\r\n\r\nThis view must be visible with defult width property value. It is bug.\r\n\r\n\r\n", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2016-02-07T08:18:38.000+0000", "updated": "2016-02-07T08:18:38.000+0000" }, { "id": "376197", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I have tested this in both Alloy and Classic project. If the child views width is not define or set as Ti.UI.FILL, 'auto', which is the default value the view does not show inside the CardView. View width '100%' works. This is a valid bug in the platform. As view has default FILL size for width of height. I have tested with SDK 5.1.2.GA\r\n\r\nh5. TEST CODE\r\nClassic\r\n{code}\r\nTi.UI.backgroundColor = 'white';\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar card = Ti.UI.Android.createCardView({\r\n contentPadding : 20,\r\n cardCornerRadius : 10,\r\n cardUseCompatPadding : true\r\n});\r\n\r\nvar view = Titanium.UI.createView({\r\n backgroundColor : 'red',\r\n width : '100%',\r\n height : 50,\r\n top:0\r\n});\r\ncard.add(view);\r\nvar label = Ti.UI.createLabel({\r\n color : 'black',\r\n text : 'A long label with\\na few line breaks\\nand unicode (UTF8)\\nsymbols such as\\na white chess piece \\u2655\\nand the euro symbol \\u20ac\\nlooks like this!\\n',\r\n});\r\ncard.add(label);\r\nwin.add(card);\r\nwin.open();\r\n{code}\r\nAlloy\r\n{code}\r\nProvided Above\r\n{code}\r\n\r\nThanks. \r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-02-07T09:41:10.000+0000", "updated": "2016-02-07T09:41:40.000+0000" }, { "id": "380708", "author": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "body": "Guys, 5.2.1.GA already out... Any news?", "updateAuthor": { "name": "falko", "key": "falko", "displayName": "Andrey Tkachenko", "active": true, "timeZone": "Europe/Moscow" }, "created": "2016-03-25T18:34:23.000+0000", "updated": "2016-03-25T18:34:23.000+0000" }, { "id": "451414", "author": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Unable to reproduce with SDK 8.1.1.GA.", "updateAuthor": { "name": "ahutton", "key": "ahutton", "displayName": "Alan Hutton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-16T21:52:34.000+0000", "updated": "2019-09-16T21:52:34.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }