{"action":"created","comment":{"url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/comments/74190577","id":74190577,"diff_hunk":"@@ -0,0 +1,97 @@\n+package ru.yandex.yamblz.ui.layouts;\n+\n+import android.content.Context;\n+import android.util.AttributeSet;\n+import android.view.View;\n+import android.view.ViewGroup;\n+\n+import java.util.ArrayList;\n+\n+public class CustomLayout extends ViewGroup {\n+    private ArrayList<View> mMatchParentChildren = new ArrayList<>();\n+\n+    public CustomLayout(Context context) {\n+        this(context, null, 0);\n+    }\n+\n+    public CustomLayout(Context context, AttributeSet attrs) {\n+        this(context, attrs, 0);\n+    }\n+\n+    public CustomLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n+        super(context, attrs, defStyleAttr);\n+    }\n+\n+    @Override\n+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {","path":"app/src/main/java/ru/yandex/yamblz/ui/layouts/CustomLayout.java","position":26,"original_position":26,"commit_id":"4f1158b74cdccd8d11a807ab04b3f77ad524f3a4","original_commit_id":"62d54553851e56f40b1a19c0551ce71ba8ab20e1","user":{"login":"katkalof","id":1605901,"avatar_url":"https://avatars.githubusercontent.com/u/1605901?v=3","gravatar_id":"","url":"https://api.github.com/users/katkalof","html_url":"https://github.com/katkalof","followers_url":"https://api.github.com/users/katkalof/followers","following_url":"https://api.github.com/users/katkalof/following{/other_user}","gists_url":"https://api.github.com/users/katkalof/gists{/gist_id}","starred_url":"https://api.github.com/users/katkalof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katkalof/subscriptions","organizations_url":"https://api.github.com/users/katkalof/orgs","repos_url":"https://api.github.com/users/katkalof/repos","events_url":"https://api.github.com/users/katkalof/events{/privacy}","received_events_url":"https://api.github.com/users/katkalof/received_events","type":"User","site_admin":false},"body":"да я про прошлый случай и рассказывал, про measureChild. Типа почему это все работало раньше :) \r\nПока тыкался сейчас, понял, что забыл проверять отсутствие match_parent элементов и делил на 0. Видимо, забыл добавить проверку, когда решил, что у меня может быть их больше одного. so sad \r\nпофиксил","created_at":"2016-08-10T06:15:33Z","updated_at":"2016-08-10T06:15:33Z","html_url":"https://github.com/yamblz-native/custom-viewgroup/pull/25#discussion_r74190577","pull_request_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/comments/74190577"},"html":{"href":"https://github.com/yamblz-native/custom-viewgroup/pull/25#discussion_r74190577"},"pull_request":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25","id":78963935,"html_url":"https://github.com/yamblz-native/custom-viewgroup/pull/25","diff_url":"https://github.com/yamblz-native/custom-viewgroup/pull/25.diff","patch_url":"https://github.com/yamblz-native/custom-viewgroup/pull/25.patch","issue_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/25","number":25,"state":"open","locked":false,"title":"Владимир Каткалов @katkalov","user":{"login":"katkalof","id":1605901,"avatar_url":"https://avatars.githubusercontent.com/u/1605901?v=3","gravatar_id":"","url":"https://api.github.com/users/katkalof","html_url":"https://github.com/katkalof","followers_url":"https://api.github.com/users/katkalof/followers","following_url":"https://api.github.com/users/katkalof/following{/other_user}","gists_url":"https://api.github.com/users/katkalof/gists{/gist_id}","starred_url":"https://api.github.com/users/katkalof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katkalof/subscriptions","organizations_url":"https://api.github.com/users/katkalof/orgs","repos_url":"https://api.github.com/users/katkalof/repos","events_url":"https://api.github.com/users/katkalof/events{/privacy}","received_events_url":"https://api.github.com/users/katkalof/received_events","type":"User","site_admin":false},"body":"Запрошенное в задании поведение аналогично LinearLayout с layout_heigh=match_parent, искомый элемент match_parent в CustomLayout аналогичен элементу данного LL weight=n(у всех одно, если хотим несколько) и layout_width=0dp.\r\n\r\nРассмотрено большое количество различных случаев размещения CustomLayout и его сравнение с LL, в частности:\r\nвозможность  расположения нескольких элементов c width match_parent, расстояние делится поровну\r\nотсутствие элементов с match_parent\r\nрасположения CustomLayout в ScrollView и HorizontalScrollView\r\nустановка margin и padding CustomLayout\r\nразличная высота вложенных View\r\nи что-нибудь еще\r\n\r\nТочно отсутствует:\r\nmargin у детей (интересно, как это происходит?)\r\n\r\n![device-2016-07-27-072138](https://cloud.githubusercontent.com/assets/1605901/17163921/358c44ba-53cc-11e6-97bf-51f95dce0082.png)\r\n![device-2016-07-27-072211](https://cloud.githubusercontent.com/assets/1605901/17163920/358b7abc-53cc-11e6-8cd2-1d60ebd0168b.png)\r\n![device-2016-07-27-072220](https://cloud.githubusercontent.com/assets/1605901/17163922/358d72b8-53cc-11e6-8ac1-0bc51b9dc1ad.png)\r\n![device-2016-07-27-072230](https://cloud.githubusercontent.com/assets/1605901/17163924/35900280-53cc-11e6-9648-39a3418dc2fa.png)\r\n![device-2016-07-27-072240](https://cloud.githubusercontent.com/assets/1605901/17163923/358e0e12-53cc-11e6-81c8-5d7a3e05dbf6.png)\r\n\r\n\r\n\r\n\r\n","created_at":"2016-07-27T04:32:35Z","updated_at":"2016-08-10T06:15:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a5dd4fdc540e4a30659b340cb7b7135a472cda2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25/commits","review_comments_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25/comments","review_comment_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/25/comments","statuses_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/statuses/4f1158b74cdccd8d11a807ab04b3f77ad524f3a4","head":{"label":"katkalof:master","ref":"master","sha":"4f1158b74cdccd8d11a807ab04b3f77ad524f3a4","user":{"login":"katkalof","id":1605901,"avatar_url":"https://avatars.githubusercontent.com/u/1605901?v=3","gravatar_id":"","url":"https://api.github.com/users/katkalof","html_url":"https://github.com/katkalof","followers_url":"https://api.github.com/users/katkalof/followers","following_url":"https://api.github.com/users/katkalof/following{/other_user}","gists_url":"https://api.github.com/users/katkalof/gists{/gist_id}","starred_url":"https://api.github.com/users/katkalof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katkalof/subscriptions","organizations_url":"https://api.github.com/users/katkalof/orgs","repos_url":"https://api.github.com/users/katkalof/repos","events_url":"https://api.github.com/users/katkalof/events{/privacy}","received_events_url":"https://api.github.com/users/katkalof/received_events","type":"User","site_admin":false},"repo":{"id":63824350,"name":"yamblz-hw-custom-viewgroup","full_name":"katkalof/yamblz-hw-custom-viewgroup","owner":{"login":"katkalof","id":1605901,"avatar_url":"https://avatars.githubusercontent.com/u/1605901?v=3","gravatar_id":"","url":"https://api.github.com/users/katkalof","html_url":"https://github.com/katkalof","followers_url":"https://api.github.com/users/katkalof/followers","following_url":"https://api.github.com/users/katkalof/following{/other_user}","gists_url":"https://api.github.com/users/katkalof/gists{/gist_id}","starred_url":"https://api.github.com/users/katkalof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katkalof/subscriptions","organizations_url":"https://api.github.com/users/katkalof/orgs","repos_url":"https://api.github.com/users/katkalof/repos","events_url":"https://api.github.com/users/katkalof/events{/privacy}","received_events_url":"https://api.github.com/users/katkalof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katkalof/yamblz-hw-custom-viewgroup","description":"HomeWork","fork":true,"url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup","forks_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/forks","keys_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/teams","hooks_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/hooks","issue_events_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/issues/events{/number}","events_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/events","assignees_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/assignees{/user}","branches_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/branches{/branch}","tags_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/tags","blobs_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/git/refs{/sha}","trees_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/statuses/{sha}","languages_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/languages","stargazers_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/stargazers","contributors_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/contributors","subscribers_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/subscribers","subscription_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/subscription","commits_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/commits{/sha}","git_commits_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/git/commits{/sha}","comments_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/comments{/number}","issue_comment_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/issues/comments{/number}","contents_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/contents/{+path}","compare_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/merges","archive_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/downloads","issues_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/issues{/number}","pulls_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/pulls{/number}","milestones_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/milestones{/number}","notifications_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/labels{/name}","releases_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/releases{/id}","deployments_url":"https://api.github.com/repos/katkalof/yamblz-hw-custom-viewgroup/deployments","created_at":"2016-07-21T00:42:46Z","updated_at":"2016-07-27T07:23:22Z","pushed_at":"2016-08-10T06:10:36Z","git_url":"git://github.com/katkalof/yamblz-hw-custom-viewgroup.git","ssh_url":"git@github.com:katkalof/yamblz-hw-custom-viewgroup.git","clone_url":"https://github.com/katkalof/yamblz-hw-custom-viewgroup.git","svn_url":"https://github.com/katkalof/yamblz-hw-custom-viewgroup","homepage":null,"size":126,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yamblz-native:master","ref":"master","sha":"d7f239d55580dde2aec69d07a3f0489d910d48d0","user":{"login":"yamblz-native","id":20421172,"avatar_url":"https://avatars.githubusercontent.com/u/20421172?v=3","gravatar_id":"","url":"https://api.github.com/users/yamblz-native","html_url":"https://github.com/yamblz-native","followers_url":"https://api.github.com/users/yamblz-native/followers","following_url":"https://api.github.com/users/yamblz-native/following{/other_user}","gists_url":"https://api.github.com/users/yamblz-native/gists{/gist_id}","starred_url":"https://api.github.com/users/yamblz-native/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamblz-native/subscriptions","organizations_url":"https://api.github.com/users/yamblz-native/orgs","repos_url":"https://api.github.com/users/yamblz-native/repos","events_url":"https://api.github.com/users/yamblz-native/events{/privacy}","received_events_url":"https://api.github.com/users/yamblz-native/received_events","type":"Organization","site_admin":false},"repo":{"id":63282643,"name":"custom-viewgroup","full_name":"yamblz-native/custom-viewgroup","owner":{"login":"yamblz-native","id":20421172,"avatar_url":"https://avatars.githubusercontent.com/u/20421172?v=3","gravatar_id":"","url":"https://api.github.com/users/yamblz-native","html_url":"https://github.com/yamblz-native","followers_url":"https://api.github.com/users/yamblz-native/followers","following_url":"https://api.github.com/users/yamblz-native/following{/other_user}","gists_url":"https://api.github.com/users/yamblz-native/gists{/gist_id}","starred_url":"https://api.github.com/users/yamblz-native/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamblz-native/subscriptions","organizations_url":"https://api.github.com/users/yamblz-native/orgs","repos_url":"https://api.github.com/users/yamblz-native/repos","events_url":"https://api.github.com/users/yamblz-native/events{/privacy}","received_events_url":"https://api.github.com/users/yamblz-native/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yamblz-native/custom-viewgroup","description":"HomeWork","fork":false,"url":"https://api.github.com/repos/yamblz-native/custom-viewgroup","forks_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/forks","keys_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/teams","hooks_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/hooks","issue_events_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/events{/number}","events_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/events","assignees_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/assignees{/user}","branches_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/branches{/branch}","tags_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/tags","blobs_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/git/refs{/sha}","trees_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/statuses/{sha}","languages_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/languages","stargazers_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/stargazers","contributors_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/contributors","subscribers_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/subscribers","subscription_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/subscription","commits_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/commits{/sha}","git_commits_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/git/commits{/sha}","comments_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/comments{/number}","issue_comment_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/comments{/number}","contents_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/contents/{+path}","compare_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/merges","archive_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/downloads","issues_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues{/number}","pulls_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls{/number}","milestones_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/milestones{/number}","notifications_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/labels{/name}","releases_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/releases{/id}","deployments_url":"https://api.github.com/repos/yamblz-native/custom-viewgroup/deployments","created_at":"2016-07-13T22:03:38Z","updated_at":"2016-07-13T22:06:33Z","pushed_at":"2016-08-10T06:10:38Z","git_url":"git://github.com/yamblz-native/custom-viewgroup.git","ssh_url":"git@github.com:yamblz-native/custom-viewgroup.git","clone_url":"https://github.com/yamblz-native/custom-viewgroup.git","svn_url":"https://github.com/yamblz-native/custom-viewgroup","homepage":null,"size":117,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":27,"forks":28,"open_issues":27,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25"},"html":{"href":"https://github.com/yamblz-native/custom-viewgroup/pull/25"},"issue":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/25"},"comments":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/yamblz-native/custom-viewgroup/statuses/4f1158b74cdccd8d11a807ab04b3f77ad524f3a4"}}}}
{"actor":{"display_login":"katkalof"}}