Skip to content

Instantly share code, notes, and snippets.

@rspencer01
Last active April 13, 2017 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rspencer01/0b3e467a58ab56a23f60579ea193189f to your computer and use it in GitHub Desktop.
Save rspencer01/0b3e467a58ab56a23f60579ea193189f to your computer and use it in GitHub Desktop.
Android Yoga usage
<YogaLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
yoga:yg_justifyContent="stretch">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
yoga:yg_flex="1"/>
<VirtualYogaLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
yoga:padding_all="20px"
yoga:yg_flexDirection="row"
yoga:yg_alignItems="center">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
yoga:yg_flex="1"
yoga:yg_marginStart="20px"/>
</VirtualYogaLayout>
</YogaLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment