Created
March 14, 2017 07:58
-
-
Save seventhmoon/17806bcf5890387b5f5770cd7fb246a0 to your computer and use it in GitHub Desktop.
FlexboxLayout
This file contains hidden or 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"?> | |
<com.google.android.flexbox.FlexboxLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:flexWrap="wrap" | |
android:layout_gravity="center" | |
app:alignItems="center" | |
tools:context="com.androidfung.layoutsample.MainActivity"> | |
<android.support.v7.widget.CardView | |
android:layout_width="320dp" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:minWidth="320dp" | |
app:layout_flexGrow="1" | |
app:layout_gravity="center" | |
> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Hello World!" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
</android.support.v7.widget.CardView> | |
<android.support.v7.widget.CardView | |
android:layout_width="320dp" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:minWidth="320dp" | |
app:layout_flexGrow="1" | |
app:layout_gravity="center" | |
> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Hello World!" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
</android.support.v7.widget.CardView> <android.support.v7.widget.CardView | |
android:layout_width="320dp" | |
android:layout_height="wrap_content" | |
android:layout_margin="8dp" | |
android:minWidth="320dp" | |
app:layout_flexGrow="1" | |
app:layout_gravity="center" | |
> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Hello World!" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
</android.support.v7.widget.CardView> | |
</com.google.android.flexbox.FlexboxLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment