{"action":"created","issue":{"url":"https://api.github.com/repos/JetBrains/anko/issues/59","labels_url":"https://api.github.com/repos/JetBrains/anko/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/JetBrains/anko/issues/59/comments","events_url":"https://api.github.com/repos/JetBrains/anko/issues/59/events","html_url":"https://github.com/JetBrains/anko/pull/59","id":85415095,"number":59,"title":"Smarter LayoutParams extraction","user":{"login":"EddieRingle","id":32543,"avatar_url":"https://avatars.githubusercontent.com/u/32543?v=3","gravatar_id":"","url":"https://api.github.com/users/EddieRingle","html_url":"https://github.com/EddieRingle","followers_url":"https://api.github.com/users/EddieRingle/followers","following_url":"https://api.github.com/users/EddieRingle/following{/other_user}","gists_url":"https://api.github.com/users/EddieRingle/gists{/gist_id}","starred_url":"https://api.github.com/users/EddieRingle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EddieRingle/subscriptions","organizations_url":"https://api.github.com/users/EddieRingle/orgs","repos_url":"https://api.github.com/users/EddieRingle/repos","events_url":"https://api.github.com/users/EddieRingle/events{/privacy}","received_events_url":"https://api.github.com/users/EddieRingle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T04:19:51Z","updated_at":"2015-06-06T00:33:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JetBrains/anko/pulls/59","html_url":"https://github.com/JetBrains/anko/pull/59","diff_url":"https://github.com/JetBrains/anko/pull/59.diff","patch_url":"https://github.com/JetBrains/anko/pull/59.patch"},"body":"One thing that's bugged me with Anko has been in cases where it generates DSL for ViewGroups using ViewGroup.LayoutParams instead of a more specific subclass even though one is available. I updated the method that pulls the LayoutParams node out to search up a ViewGroup's inheritance tree to find the nearest `generateLayoutParams()` method and use that method's return type to determine the correct LayoutParams implementation.\r\n\r\nOne side effect is that you can no longer use AbsoluteLayout.LayoutParams in the `absoluteLayout` DSL, since AbsoluteLayout's `generateLayoutParams()` method seems to return a vanilla ViewGroup.LayoutParams instance for some reason. I don't see this as a loss, however; AbsoluteLayout has been deprecated for a long time and you probably shouldn't be using it anyway."},"comment":{"url":"https://api.github.com/repos/JetBrains/anko/issues/comments/109490389","html_url":"https://github.com/JetBrains/anko/pull/59#issuecomment-109490389","issue_url":"https://api.github.com/repos/JetBrains/anko/issues/59","id":109490389,"user":{"login":"brennantaylor","id":2840772,"avatar_url":"https://avatars.githubusercontent.com/u/2840772?v=3","gravatar_id":"","url":"https://api.github.com/users/brennantaylor","html_url":"https://github.com/brennantaylor","followers_url":"https://api.github.com/users/brennantaylor/followers","following_url":"https://api.github.com/users/brennantaylor/following{/other_user}","gists_url":"https://api.github.com/users/brennantaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/brennantaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brennantaylor/subscriptions","organizations_url":"https://api.github.com/users/brennantaylor/orgs","repos_url":"https://api.github.com/users/brennantaylor/repos","events_url":"https://api.github.com/users/brennantaylor/events{/privacy}","received_events_url":"https://api.github.com/users/brennantaylor/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T00:33:20Z","updated_at":"2015-06-06T00:33:20Z","body":":trophy: "}}