{ "id": "152371", "key": "TIMOB-19801", "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": "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": "2015-12-01T02:03:11.000+0000", "created": "2015-10-27T11:54:43.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [ { "id": "49890", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "outwardIssue": { "id": "152342", "key": "TIMOB-19796", "fields": { "summary": "Android: CardView Layout property not working as expected", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2017-03-21T22:12:30.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": "The following sample demonstrates that the app crashes when you use both the {{backgroundColor}} and {{cardCornerRadius}} property on a CardView. If you use {{cardBackgroundColor}} instead it works.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar card = Ti.UI.Android.createCardView({\r\n\ttop: 20,\r\n\tleft: 20,\r\n\tright: 20,\r\n\tcontentPadding: 20,\r\n\r\n\t// Remove and it won't crash\r\n\tcardCornerRadius: 20,\r\n\r\n\t// Rename to cardBackgroundColor and it won't crash\r\n\tbackgroundColor: '#F00'\r\n});\r\n\r\ncard.add(Ti.UI.createLabel({\r\n\ttext: 'Hello, world!',\r\n\tcolor: '#000'\r\n}));\r\n\r\nwin.add(card);\r\n\r\nwin.open();\r\n{code}\r\n\r\n*Logs*\r\n\r\n{code}\r\n[ERROR] TiApplication: (main) [478,478] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable; Titanium 5.1.0,2015/10/26 16:46,c914b0f\r\n[ERROR] TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{test.android/org.appcelerator.titanium.TiActivity}: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.access$800(ActivityThread.java:151)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)\r\n[ERROR] TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n[ERROR] TiApplication: \tat android.os.Looper.loop(Looper.java:135)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5254)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Native Method)\r\n[ERROR] TiApplication: \tat java.lang.reflect.Method.invoke(Method.java:372)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)\r\n[ERROR] TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)\r\n[ERROR] TiApplication: Caused by: java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawable\r\n[ERROR] TiApplication: \tat android.support.v7.widget.CardViewApi21.setRadius(CardViewApi21.java:36)\r\n[ERROR] TiApplication: \tat android.support.v7.widget.CardView.setRadius(CardView.java:281)\r\n[ERROR] TiApplication: \tat ti.modules.titanium.ui.widget.TiUICardView.processProperties(TiUICardView.java:62)\r\n[ERROR] TiApplication: \tat org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:505)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:512)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:496)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:474)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:675)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.jav\r\n[ERROR] TiApplication: \tat ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:237)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:501)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:594)\r\n[ERROR] TiApplication: \tat org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)\r\n[ERROR] TiApplication: \tat android.app.Activity.performCreate(Activity.java:5990)\r\n[ERROR] TiApplication: \tat android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)\r\n[ERROR] TiApplication: \tat android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)\r\n[ERROR] TiApplication: \t... 10 more\r\n-- End application log -------------------------------------------------------\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: CardView causes crash when cardCornerRadius AND backgroundColor are set", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.0.v20151026164636", "closedSprints": [ { "id": 529, "state": "closed", "name": "2015 Sprint 24 SDK", "startDate": "2015-11-21T01:30:12.670Z", "endDate": "2015-12-05T01:30:00.000Z", "completeDate": "2015-12-07T03:57:17.094Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "367982", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~msamah] It also crashes if you set both {{backgroundColor}} and {{cardBackgroundColor}}.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-27T12:00:03.000+0000", "updated": "2015-10-27T12:00:03.000+0000" }, { "id": "370666", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-18T08:00:06.000+0000", "updated": "2015-11-18T08:00:06.000+0000" }, { "id": "370683", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Confirmed fixed!", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-18T12:21:32.000+0000", "updated": "2015-11-18T12:21:32.000+0000" }, { "id": "370777", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Will close this ticket once TIMOB-19796 is merged and resolved.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-19T02:20:17.000+0000", "updated": "2015-11-19T02:20:17.000+0000" }, { "id": "414549", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:12:30.000+0000", "updated": "2017-03-21T22:12:30.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }