android/sample/res/layout/main_layout.xml (128 lines of code) (raw):

<?xml version="1.0" encoding="utf-8" ?> <!-- Copyright 2014-present, Facebook, Inc. All rights reserved. This source code is licensed under the license found in the LICENSE-examples file in the root directory of this source tree. --> <YogaLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yoga="http://schemas.android.com/apk/res/com.facebook.samples.yoga" android:layout_width="match_parent" android:layout_height="match_parent" > <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 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_2_text" android:textColor="@color/children_text" yoga:yg_flex="1" yoga:yg_marginStart="8dp" /> </YogaLayout> <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_3_text" android:textColor="@color/children_text" yoga:yg_flex="1" yoga:yg_marginStart="8dp" /> </YogaLayout> <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_4_text" android:textColor="@color/children_text" yoga:yg_flex="1" yoga:yg_marginStart="8dp" /> </YogaLayout> <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_5_text" android:textColor="@color/children_text" yoga:yg_flex="1" yoga:yg_marginStart="10dp" /> </YogaLayout> </YogaLayout>