{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/componentkit/issues/332","labels_url":"https://api.github.com/repos/facebook/componentkit/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/facebook/componentkit/issues/332/comments","events_url":"https://api.github.com/repos/facebook/componentkit/issues/332/events","html_url":"https://github.com/facebook/componentkit/issues/332","id":98604969,"number":332,"title":"Question - How can I apply a layout margin in a stack component","user":{"login":"avnerbarr","id":2404795,"avatar_url":"https://avatars.githubusercontent.com/u/2404795?v=3","gravatar_id":"","url":"https://api.github.com/users/avnerbarr","html_url":"https://github.com/avnerbarr","followers_url":"https://api.github.com/users/avnerbarr/followers","following_url":"https://api.github.com/users/avnerbarr/following{/other_user}","gists_url":"https://api.github.com/users/avnerbarr/gists{/gist_id}","starred_url":"https://api.github.com/users/avnerbarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avnerbarr/subscriptions","organizations_url":"https://api.github.com/users/avnerbarr/orgs","repos_url":"https://api.github.com/users/avnerbarr/repos","events_url":"https://api.github.com/users/avnerbarr/events{/privacy}","received_events_url":"https://api.github.com/users/avnerbarr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-02T11:56:25Z","updated_at":"2015-08-03T19:44:58Z","closed_at":null,"body":"I'm trying to accomplish \"stretch\" for a component and add a layout margin with right alignment. (comparable to android linear layout)\r\n\r\nIn android it could be accomplished by\r\n\r\n```\r\n    <LinearLayout\r\n        android:layout_width=\"match_parent\"\r\n\t\tandroid:layout_height=\"match_parent\"\r\n        android:orientation=\"vertical\"\r\n        android:layout_gravity=\"center_horizontal\"\r\n        >\r\n        <TextView\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"wrap_content\"\r\n            android:layout_marginLeft=\"20dp\"\r\n            android:textStyle=\"bold\"\r\n            android:fontFamily=\"sans-serif-light\"\r\n            android:text=\"1234567\"\r\n\t\t\tandroid:padding=\"0dp\"\r\n            android:textColor=\"@android:color/black\"\r\n            android:background=\"#ff0000\"\r\n            android:gravity=\"right\"\r\n            />\r\n    </LinearLayout>\r\n```\r\n\r\nI've tried various combinations but I find that the stack layout ```alignSelf``` only applies to the outer component so I am not able to align the correct component to the right.\r\n\r\n\r\nAny ideas how I could accomplish this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/componentkit/issues/comments/127383958","html_url":"https://github.com/facebook/componentkit/issues/332#issuecomment-127383958","issue_url":"https://api.github.com/repos/facebook/componentkit/issues/332","id":127383958,"user":{"login":"avnerbarr","id":2404795,"avatar_url":"https://avatars.githubusercontent.com/u/2404795?v=3","gravatar_id":"","url":"https://api.github.com/users/avnerbarr","html_url":"https://github.com/avnerbarr","followers_url":"https://api.github.com/users/avnerbarr/followers","following_url":"https://api.github.com/users/avnerbarr/following{/other_user}","gists_url":"https://api.github.com/users/avnerbarr/gists{/gist_id}","starred_url":"https://api.github.com/users/avnerbarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avnerbarr/subscriptions","organizations_url":"https://api.github.com/users/avnerbarr/orgs","repos_url":"https://api.github.com/users/avnerbarr/repos","events_url":"https://api.github.com/users/avnerbarr/events{/privacy}","received_events_url":"https://api.github.com/users/avnerbarr/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T19:44:58Z","updated_at":"2015-08-03T19:44:58Z","body":"Actually something that could vertically align a child in a vertical layout (for instance align one child at the bottom in a vertical layout while the other is aligned top)"}}