Title: CommonLayoutParams cannot be cast to android.widget.AbsListView · Issue #1710 · NativeScript/NativeScript · GitHub
Open Graph Title: CommonLayoutParams cannot be cast to android.widget.AbsListView · Issue #1710 · NativeScript/NativeScript
X Title: CommonLayoutParams cannot be cast to android.widget.AbsListView · Issue #1710 · NativeScript/NativeScript
Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes Tell us about the problem Please, ensure your title is less than 63 characters long and star...
Open Graph Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes Tell us about the problem Please, ensure your title ...
X Description: Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes Tell us about the problem Please, ensure your title ...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/1710
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CommonLayoutParams cannot be cast to android.widget.AbsListView","articleBody":"## Please, provide the details below:\n### Did you verify this is a real problem by searching [Stack Overflow](http://stackoverflow.com/questions/tagged/nativescript) and the [other open issues in this repo](https://github.com/NativeScript/nativescript/issues)?\n\nYes\n### Tell us about the problem\n\nPlease, ensure your title is less than 63 characters long and starts with a capital\nletter.\n\nSo this all works on iOS, the usecase is items in a listview can be clicked, in the client event I change the the class of an object in the listview, and then the text of a label. In iOS, it selects, on android the code runs, but right after my method the app crashes with this error:\n### Error\n\n```\njava.lang.ClassCastException: org.nativescript.widgets.CommonLayoutParams cannot be cast to android.widget.AbsListView$LayoutParams\nat android.widget.AbsListView$RecycleBin.fillActiveViews(AbsListView.java:8584)\nat android.widget.ListView.layoutChildren(ListView.java:1665)\nat android.widget.AbsListView.onLayout(AbsListView.java:2640)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)\nat org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat android.support.v4.view.ViewPager.onLayout(ViewPager.java:1684)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)\nat org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)\nat org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)\nat org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)\nat android.widget.FrameLayout.onLayout(FrameLayout.java:514)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)\nat android.widget.FrameLayout.onLayout(FrameLayout.java:514)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)\nat android.widget.FrameLayout.onLayout(FrameLayout.java:514)\nat android.view.View.layout(View.java:16922)\nat android.view.ViewGroup.layout(ViewGroup.java:5405)\nat android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2413)\nat android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2122)\nat android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1264)\nat android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6944)\nat android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)\nat android.view.Choreographer.doCallbacks(Choreographer.java:590)\nat android.view.Choreographer.doFrame(Choreographer.java:560)\nat android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)\nat android.os.Handler.handleCallback(Handler.java:739)\nat android.os.Handler.dispatchMessage(Handler.java:95)\nat android.os.Looper.loop(Looper.java:145)\nat android.app.ActivityThread.main(ActivityThread.java:6837)\nat java.lang.reflect.Method.invoke(Native Method)\nat java.lang.reflect.Method.invoke(Method.java:372)\nat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)\nat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)\n```\n### Which platform(s) does your issue occur on?\n\nAndroid\n### Please provide the following version numbers that your issue occurs with:\n\n```\n{\n \"name\": \"tns-core-modules\",\n \"description\": \"Telerik NativeScript Core Modules\",\n \"version\": \"1.6.0\",\n \"homepage\": \"https://www.nativescript.org\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/NativeScript/NativeScript/commit/185b4c2480d8b08b569d23ebc1e533f684e434a4\"\n },\n \"files\": [\n \"**/*.*\",\n \"**/*\",\n \"!.baseDir.*\",\n \"!node-tests/\",\n \"!apps/\"\n ],\n \"license\": \"Apache-2.0\",\n \"devDependencies\": {\n \"chai\": \"3.2.0\",\n \"grunt\": \"0.4.5\",\n \"grunt-contrib-clean\": \"0.6.0\",\n \"grunt-contrib-copy\": \"git+https://github.com/ErjanGavalji/grunt-contrib-copy.git#1c976a133210be4ce8c96313f5daf14833f7f8f9\",\n \"grunt-env\": \"0.4.4\",\n \"grunt-exec\": \"0.4.6\",\n \"grunt-mkdir\": \"0.1.2\",\n \"grunt-multi-dest\": \"1.0.0\",\n \"grunt-shell\": \"1.1.2\",\n \"grunt-simple-mocha\": \"0.4.0\",\n \"grunt-ts\": \"5.3.2\",\n \"grunt-typedoc\": \"0.2.3\",\n \"grunt-untar\": \"0.0.1\",\n \"mocha\": \"2.2.5\",\n \"shelljs\": \"0.5.3\",\n \"grunt-tslint\": \"3.0.0\",\n \"time-grunt\": \"^1.3.0\",\n \"tslint\": \"3.3.0\",\n \"typescript\": \"1.7.5\"\n },\n \"typings\": \"tns-core-modules.d.ts\",\n \"dependencies\": {\n \"tns-core-modules-widgets\": \"1.6.1\"\n },\n \"nativescript\": {\n \"platforms\": {\n \"ios\": \"1.6.0\",\n \"android\": \"1.6.0\"\n }\n },\n \"_id\": \"tns-core-modules@1.6.0\",\n \"_shasum\": \"2497836382c9857f2dea8e8a7ab59d8c284169a2\",\n \"_resolved\": \"https://registry.npmjs.org/tns-core-modules/-/tns-core-modules-1.6.0.tgz\",\n \"_from\": \"tns-core-modules@latest\",\n \"scripts\": {},\n \"_npmVersion\": \"2.14.7\",\n \"_nodeVersion\": \"4.2.2\",\n \"_npmUser\": {\n \"name\": \"enchev\",\n \"email\": \"vladimir.enchev@gmail.com\"\n },\n \"dist\": {\n \"shasum\": \"2497836382c9857f2dea8e8a7ab59d8c284169a2\",\n \"tarball\": \"http://registry.npmjs.org/tns-core-modules/-/tns-core-modules-1.6.0.tgz\"\n },\n \"maintainers\": [\n {\n \"name\": \"enchev\",\n \"email\": \"vladimir.enchev@gmail.com\"\n },\n {\n \"name\": \"erjangavalji\",\n \"email\": \"erjan.gavalji@gmail.com\"\n },\n {\n \"name\": \"fatme\",\n \"email\": \"hfatme@gmail.com\"\n },\n {\n \"name\": \"hdeshev\",\n \"email\": \"hristo@deshev.com\"\n },\n {\n \"name\": \"ligaz\",\n \"email\": \"stefan.dobrev@gmail.com\"\n },\n {\n \"name\": \"nsndeck\",\n \"email\": \"nedyalko.nikolov@telerik.com\"\n },\n {\n \"name\": \"sdobrev\",\n \"email\": \"stefan.dobrev@gmail.com\"\n },\n {\n \"name\": \"valio.stoychev\",\n \"email\": \"valio.stoychev@gmail.com\"\n }\n ],\n \"_npmOperationalInternal\": {\n \"host\": \"packages-5-east.internal.npmjs.com\",\n \"tmp\": \"tmp/tns-core-modules-1.6.0.tgz_1455717250557_0.07532842340879142\"\n },\n \"directories\": {}\n}\n```\n### Please tell us how to recreate the issue in as much detail as possible.\n\nhttps://www.dropbox.com/s/ycsfxn1ezqadp5x/OutbreakHelp.zip?dl=0\nIn the app: Resources-\u003eFilterFAB-\u003eCategories-\u003e pick anything\nIn the code: app/views/resources/filter/filter.js line around line 107... this code all WORKS, the crashing happens after it runs.\n### Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.\n\n``` xml\n\u003cGridLayout rows=\"auto, *\" columns=\"*\"\u003e\n \u003cLabel row=\"0\" text=\"Topics\" textWrap=\"false\" class=\"type-header\" /\u003e\n \u003cListView row=\"1\" id=\"categoryRepeater\" items=\"{{ topics }}\" itemTap=\"onCategoryTap\"\u003e\n \u003cListView.itemTemplate\u003e\n \u003cStackLayout class=\"{{ IsSelected ? 'filter-item-selected' : 'filter-item' }}\" tap=\"onCategoryTap\"\u003e\n \u003cStackLayout class=\"{{ IsChild ? 'filter-child' : '' }}\"\u003e\n \u003cGridLayout rows=\"*\" columns=\"30, *\"\u003e\n \u003cLabel row=\"0\" col=\"0\" text=\"{{ IsSelected ? '\u0026#xe834;' : '\u0026#xe835;' }}\" class=\"selection-icon\" /\u003e\n \u003cLabel row=\"0\" col=\"1\" text=\"{{ Title }}\" class=\"text\" /\u003e\n \u003c/GridLayout\u003e\n \u003c/StackLayout\u003e\n \u003cStackLayout class=\"{{ IsSelected ? 'filter-bottom-selected' : 'filter-bottom' }}\" /\u003e\n \u003c/StackLayout\u003e\n \u003c/ListView.itemTemplate\u003e\n \u003c/ListView\u003e\n \u003c/GridLayout\u003e\n```\n\n``` js\nexports.onCategoryTap = function(args){\n selectListItem(args, \"categoryRepeater\");\n}\n\nfunction selectListItem(args, repeaterId){\n var stack = args.object;\n var item = stack.bindingContext;\n item.IsSelected = (item.IsSelected) ? false : true;\n stack.cssClass = (item.IsSelected) ? \"filter-item-selected\" : \"filter-item\";\n\n var icon = stack.getElementsByClassName(\"selection-icon\")[0];\n\n if(appModule.ios){\n icon.fadeOut(1).then(function(){\n if(item.IsSelected){\n icon.text = \"\\uE834\"\n\n }else{\n icon.text = \"\\uE835\"\n }\n\n icon.fadeIn(30);\n });\n }else{\n if(item.IsSelected){\n icon.text = \"\\uE834\"\n\n }else{\n icon.text = \"\\uE835\"\n }\n }\n}\n```\n","author":{"url":"https://github.com/sitefinitysteve","@type":"Person","name":"sitefinitysteve"},"datePublished":"2016-03-07T21:05:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1710/NativeScript/issues/1710"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2822dc88-9b85-0a3d-3f9d-3c9edd6ba2ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA3C:3C20AD:9367EB:C70810:6971C5C0 |
| html-safe-nonce | 88ecf1a0f3abff48104cee37e37b815149fbdc7a928f01802da8afa262a00886 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTNDOjNDMjBBRDo5MzY3RUI6QzcwODEwOjY5NzFDNUMwIiwidmlzaXRvcl9pZCI6IjExNTM2MzE5NjI2ODYxNDU5ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b5693fe0191e5463f0ccdd4e95b2a82625d45d5d9d0e969f9b3247b277854b03 |
| hovercard-subject-tag | issue:139093456 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/1710/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d3f7ed0dd65a677167bdf165345e66169c5915bd00c767869fcf05ad94c5e00/NativeScript/NativeScript/issues/1710 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d3f7ed0dd65a677167bdf165345e66169c5915bd00c767869fcf05ad94c5e00/NativeScript/NativeScript/issues/1710 |
| og:image:alt | Please, provide the details below: Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo? Yes Tell us about the problem Please, ensure your title ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sitefinitysteve |
| hostname | github.com |
| expected-hostname | github.com |
| None | ac615aa66802dad9a938c6abe95edf09ee43c0c7f508315b64b08612858ef32e |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6b618569a5f93e0b31f97f620112341421ef5f69 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width