{"action":"created","issue":{"url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/3","repository_url":"https://api.github.com/repos/lucasr/android-layout-samples","labels_url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/3/comments","events_url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/3/events","html_url":"https://github.com/lucasr/android-layout-samples/issues/3","id":88049285,"number":3,"title":"Potential Mistake ? ","user":{"login":"yrizk","id":5533858,"avatar_url":"https://avatars2.githubusercontent.com/u/5533858?v=4","gravatar_id":"","url":"https://api.github.com/users/yrizk","html_url":"https://github.com/yrizk","followers_url":"https://api.github.com/users/yrizk/followers","following_url":"https://api.github.com/users/yrizk/following{/other_user}","gists_url":"https://api.github.com/users/yrizk/gists{/gist_id}","starred_url":"https://api.github.com/users/yrizk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yrizk/subscriptions","organizations_url":"https://api.github.com/users/yrizk/orgs","repos_url":"https://api.github.com/users/yrizk/repos","events_url":"https://api.github.com/users/yrizk/events{/privacy}","received_events_url":"https://api.github.com/users/yrizk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-06-13T19:01:29Z","updated_at":"2017-08-02T09:10:37Z","closed_at":null,"body":"Hey lucas, \n\nFirst off, thank you for this repo. this is an challenging, but worthwhile endeavor. \nI was going through `TweetElement.java` , when I caught something odd with `getMeasuredHeightWithMargins(UIElement uiElement)` and `getHeightWithMargins(UIElement)` . For ease, I have attached the methods below: \n\n``` java\n private int getHeightWithMargins(UIElement element) {\n        final MarginLayoutParams lp = (MarginLayoutParams) element.getLayoutParams();\n        return element.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;\n    } \n   private int getMeasuredHeightWithMargins(UIElement element) {\n        final MarginLayoutParams lp = (MarginLayoutParams) element.getLayoutParams();\n        return element.getMeasuredHeight() + lp.topMargin + lp.bottomMargin;\n    }\n```\n\nAs you can tell, there is no different between the two. I'm still learning, so I might be wrong, but do you mean to call `element.getHeight()` in the first method? If so let me know, I'd be happy to submit a PR. \n"},"comment":{"url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/comments/319615380","html_url":"https://github.com/lucasr/android-layout-samples/issues/3#issuecomment-319615380","issue_url":"https://api.github.com/repos/lucasr/android-layout-samples/issues/3","id":319615380,"user":{"login":"lucasr","id":730395,"avatar_url":"https://avatars2.githubusercontent.com/u/730395?v=4","gravatar_id":"","url":"https://api.github.com/users/lucasr","html_url":"https://github.com/lucasr","followers_url":"https://api.github.com/users/lucasr/followers","following_url":"https://api.github.com/users/lucasr/following{/other_user}","gists_url":"https://api.github.com/users/lucasr/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasr/subscriptions","organizations_url":"https://api.github.com/users/lucasr/orgs","repos_url":"https://api.github.com/users/lucasr/repos","events_url":"https://api.github.com/users/lucasr/events{/privacy}","received_events_url":"https://api.github.com/users/lucasr/received_events","type":"User","site_admin":false},"created_at":"2017-08-02T09:10:37Z","updated_at":"2017-08-02T09:10:37Z","body":"Good points! In case you missed it, I recommend having a look at [Litho](https://github.com/facebook/litho). It incorporates a lot of these optimizations (and more!) behind a simple declarative API :-)"}}
{"actor":{"display_login":"lucasr"}}