Last active
April 13, 2017 14:39
-
-
Save rspencer01/c1964b98f0c60de7c49683a049ed0640 to your computer and use it in GitHub Desktop.
Sample Yoga Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<YogaLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:yoga="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
yoga:yg_alignItems="stretch" | |
> | |
<YogaLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="@drawable/sample_children_background" | |
yoga:yg_marginHorizontal="10dp" | |
yoga:yg_marginTop="5dp" | |
yoga:yg_flexDirection="row" | |
yoga:yg_alignItems="center" | |
> | |
<ImageView | |
android:layout_width="50dp" | |
android:layout_height="50dp" | |
android:src="@drawable/ic_launcher" | |
yoga:yg_flex="0" | |
/> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:text="@string/child_1_text" | |
android:textColor="@color/children_text" | |
yoga:yg_flex="1" | |
yoga:yg_marginStart="8dp" | |
/> | |
</YogaLayout> | |
</YogaLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment