{ "id": "148870", "key": "TIMOB-19035", "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": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-07-06T20:02:28.000+0000", "created": "2015-06-17T09:43:38.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19572", "description": "Important fixes for 6.1.0", "name": "Release 6.1.1", "archived": false, "released": true, "releaseDate": "2017-06-16" } ], "issuelinks": [ { "id": "56227", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "170671", "key": "TIMOB-25626", "fields": { "summary": "Android: ScrollableView Ti.UI.SIZE is ignored for width", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-12-23T03:57:16.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": "When I set the height {{Ti.UI.SIZE}} to the ScrollableView on Android, it will look like {{Ti.UI.FILL}}, but when I set a number for height, like {{'100dp'}}, it will work.\r\nThis problem was not happened on iOS.", "attachment": [], "flagged": false, "summary": "Android: Ti.UI.SIZE on ScrollableView not working", "creator": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "subtasks": [], "reporter": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "environment": "Titanium: 4.0.1,\r\nAlloy: 1.6.0,\r\nTitanium SDK: 4.0.0.GA,\r\nPlatform: Android 5.1.0, Android 4.4.4", "closedSprints": [ { "id": 758, "state": "closed", "name": "2016 Sprint 24 SDK", "startDate": "2016-11-19T01:32:06.991Z", "endDate": "2016-12-03T01:32:00.000Z", "completeDate": "2016-12-05T01:53:38.311Z", "originBoardId": 114 }, { "id": 920, "state": "closed", "name": "2017 Sprint 14 SDK", "startDate": "2017-07-02T16:29:41.455Z", "endDate": "2017-07-16T16:29:00.000Z", "completeDate": "2017-07-17T14:39:47.328Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "355323", "author": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I have tested this issue. and i was able to regenerate the issue. \r\n\r\nh5. TESTING ENVIRONMENT\r\n\r\nAppcelerator Command-Line Interface, version 4.0.2\r\nTitanium SDK 4.0.0.GA\r\nAppcelerator Studio, build: 4.0.1.201506021908\r\nAndroid 5.0.1, 5.0.0\r\n\r\nh5. CODE SAMPLE\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view1 = Ti.UI.createView({ backgroundColor:'#123', height: '300dp' });\r\nvar view2 = Ti.UI.createView({ backgroundColor:'#246', height: '300dp' });\r\nvar view3 = Ti.UI.createView({ backgroundColor:'#48b' ,height: '300dp'});\r\n\r\nvar scrollableView = Ti.UI.createScrollableView({\r\n\theight: Titanium.UI.SIZE,\r\n views:[view1,view2,view3],\r\n showPagingControl:true\r\n});\r\n\r\nwin.add(scrollableView);\r\nwin.open();\r\n{code}\r\n\r\nh5. OBSERVED RESULT\r\n\r\nSetting the height Ti.UI.SIZE to the ScrollableView on Android dose't work and response as Ti.UI.FILL, But when set a number for height, like '100dp', it will work. Everything works fine in iOS. Thanks.\r\n", "updateAuthor": { "name": "ahossain", "key": "ahossain", "displayName": "Amimul Hossain", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2015-06-17T11:16:19.000+0000", "updated": "2015-06-17T11:16:19.000+0000" }, { "id": "356728", "author": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "body": "Any update here?", "updateAuthor": { "name": "ethancfchen", "key": "ethancfchen", "displayName": "Ethan Chen", "active": true, "timeZone": "Asia/Taipei" }, "created": "2015-07-02T14:08:21.000+0000", "updated": "2015-07-02T14:08:21.000+0000" }, { "id": "358978", "author": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "body": "+1 ... Really could use a fix for this ... ", "updateAuthor": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "created": "2015-08-04T18:24:58.000+0000", "updated": "2015-08-04T18:24:58.000+0000" }, { "id": "383345", "author": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "8 months later... A fix would be helpful!", "updateAuthor": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-20T13:53:11.000+0000", "updated": "2016-04-20T13:53:11.000+0000" }, { "id": "385267", "author": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any update?", "updateAuthor": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-10T10:29:22.000+0000", "updated": "2016-05-10T10:29:22.000+0000" }, { "id": "400153", "author": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "14 months later.. update?", "updateAuthor": { "name": "iKettles", "key": "ikettles", "displayName": "Iain Kettles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-01T08:22:45.000+0000", "updated": "2016-11-01T08:22:45.000+0000" }, { "id": "400309", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8580", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-03T01:00:22.000+0000", "updated": "2016-11-03T01:00:22.000+0000" }, { "id": "402286", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\n{{Ti.UI.SIZE}} works as expected.\r\nClosing.\r\n\r\nAppc Studio : 4.8.1.201611291132\r\nSDK Version : 6.1.0.v20161129071600\r\nMac OS Version : 10.12\r\nXcode Version : Xcode 8.1 Build version 8B62\r\nAppc CLI AND Appc NPM : {\"NPM\":\"4.2.9-1\",\"CLI\":\"6.1.0-302\"}\r\nTi CLI : 5.0.11\r\nAlloy : 1.9.4\r\nNode : v4.6.0\r\nDevice: running 7.1Pixel", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-11-30T22:28:45.000+0000", "updated": "2016-11-30T22:28:45.000+0000" }, { "id": "423421", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "This is not fully fixed, The following example with SDK 6.1.1.GA is crashing:\r\n\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'white',\r\n layout: 'vertical'\r\n }),\r\n lbl_a = Ti.UI.createLabel({\r\n text: 'View A',\r\n height: Ti.UI.SIZE\r\n }),\r\n lbl_b = Ti.UI.createLabel({\r\n text: 'View B',\r\n height: 100\r\n }),\r\n view_a = Ti.UI.createView({\r\n backgroundColor: 'red',\r\n height: 100,\r\n width: '90%'\r\n }),\r\n view_b = Ti.UI.createView({\r\n backgroundColor: 'green',\r\n height: Ti.UI.SIZE,\r\n width: '90%'\r\n }),\r\n scrollable = Ti.UI.createScrollableView({\r\n views: [view_b, view_a],\r\n width: Ti.UI.FILL,\r\n \theight: Ti.UI.SIZE,\r\n \ttop: '30dip'\r\n });\r\n \r\nview_a.add(lbl_a);\r\nview_b.add(lbl_b);\r\n \r\nwin.add(scrollable);\r\nwin.open();\r\n{code}\r\n\r\nCrash trace: \r\n\r\n\r\n{code:java}\r\n[ERROR] : TiApplication: (main) [311,311] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'int org.appcelerator.titanium.TiDimension.getAsPixels(android.view.View)' on a null object reference; Titanium 6.1.1,2017/06/26 16:09,undefined\r\n[ERROR] : TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.appcelerator.titanium.TiDimension.getAsPixels(android.view.View)' on a null object reference\r\n[ERROR] : TiApplication: \tat ti.modules.titanium.ui.widget.TiUIScrollableView$1.onMeasure(TiUIScrollableView.java:103)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:445)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:303)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:445)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:303)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.constrainChild(TiCompositeLayout.java:445)\r\n[ERROR] : TiApplication: \tat org.appcelerator.titanium.view.TiCompositeLayout.onMeasure(TiCompositeLayout.java:303)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)\r\n[ERROR] : TiApplication: \tat android.widget.FrameLayout.onMeasure(FrameLayout.java:430)\r\n[ERROR] : TiApplication: \tat android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)\r\n[ERROR] : TiApplication: \tat android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)\r\n[ERROR] : TiApplication: \tat android.widget.FrameLayout.onMeasure(FrameLayout.java:430)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.widget.LinearLayout.measureVertical(LinearLayout.java:875)\r\n[ERROR] : TiApplication: \tat android.widget.LinearLayout.onMeasure(LinearLayout.java:613)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5463)\r\n[ERROR] : TiApplication: \tat android.widget.FrameLayout.onMeasure(FrameLayout.java:430)\r\n[ERROR] : TiApplication: \tat com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2560)\r\n[ERROR] : TiApplication: \tat android.view.View.measure(View.java:17430)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2001)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1166)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)\r\n[ERROR] : TiApplication: \tat android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)\r\n[ERROR] : TiApplication: \tat android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)\r\n[ERROR] : TiApplication: \tat android.view.Choreographer.doCallbacks(Choreographer.java:580)\r\n[ERROR] : TiApplication: \tat android.view.Choreographer.doFrame(Choreographer.java:550)\r\n[ERROR] : TiApplication: \tat android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)\r\n[ERROR] : TiApplication: \tat android.os.Handler.handleCallback(Handler.java:739)\r\n[ERROR] : TiApplication: \tat android.os.Handler.dispatchMessage(Handler.java:95)\r\n[ERROR] : TiApplication: \tat android.os.Looper.loop(Looper.java:135)\r\n[ERROR] : TiApplication: \tat android.app.ActivityThread.main(ActivityThread.java:5221)\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:899)\r\n[ERROR] : TiApplication: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)\r\n{code}\r\n", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-07-04T01:40:01.000+0000", "updated": "2017-07-04T01:40:01.000+0000" }, { "id": "423442", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9192", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-07-04T11:40:37.000+0000", "updated": "2017-07-04T11:40:37.000+0000" }, { "id": "423488", "author": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "body": "Gary I tested the commit and the app is not crashing but the scrollable view didn't resize correctly. Did it resize it for you ?\r\nThanks a lot!", "updateAuthor": { "name": "hini", "key": "hini", "displayName": "Hani Hamadeh", "active": true, "timeZone": "Asia/Beirut" }, "created": "2017-07-05T13:10:24.000+0000", "updated": "2017-07-05T13:10:24.000+0000" }, { "id": "426287", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified Fix in SDK Version: 6.2.0.v20170808135421\r\nTest and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9192 ", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-08T22:12:41.000+0000", "updated": "2017-08-08T22:12:41.000+0000" }, { "id": "432531", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~hini], the fix for [TIMOB-25626] involves refactoring the Ti.UI.SIZE handing of the ScrollableView for both width and height. It will likely resolved the remaining sizing edge-cases left. This fix is currently scheduled for Titanium 7.1.0, so, stay tuned.", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-12-23T03:57:16.000+0000", "updated": "2017-12-23T03:57:16.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }