Add android bindings to margin:auto

Summary: [This commit](1146013e9e) (or diff D4501142) adds an `auto` option for margins.  This diff allows you to leverage that in android via attribute `yoga:margin_all="auto"` (and as expected for the other edges).

Reviewed By: emilsjolander

Differential Revision: D4634684

fbshipit-source-id: 158f70ec975b5bb3a666e590b76eb52daeb38f49
This commit is contained in:
Robert Spencer
2017-03-01 05:51:52 -08:00
committed by Facebook Github Bot
parent 3ef2970032
commit b940fadb7e
3 changed files with 69 additions and 27 deletions

View File

@@ -26,3 +26,7 @@ RTL locales are supported by default. That is, unless you explicitly set the `y
## Attributes
The list of all attributes can be found in [attrs.xml](https://github.com/facebook/yoga/blob/master/android/sample/res/com/facebook/samples/yoga/res/values/attrs.xml), but logically map from the Yoga properties.
## Auto margins
You can specify `margin_left="auto"` (or `margin_right` etc.) for auto values. This is in addition to the dimensions you can speicfy, such as `margin_left="20dp"`.