Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add gradle usage
  • Loading branch information
FlyingRadish authored Sep 11, 2016
1 parent 18ea1d7 commit 6ffb502
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# FlexLayout
flex layout in Android!

##Usage
- Step 1
Add these to your project's build.gradle
```
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
- Step 2
Add dependency
```
dependencies {
compile 'com.github.houxg:FlexLayout:1.2'
}
```

##Attrs
- justify-content
- align-content
- align-item
- rowDividerHeight
- itemDividerWidth
- rowGap
- colGap

##Example
###Flex
Expand All @@ -23,18 +42,3 @@ flex layout in Android!
---
###Justify space around
![](https://raw.githubusercontent.com/houxg/ScreenShot/master/FlexLayout/justify_space_around.jpg)
##Useage
```
<org.houxg.flexlayout.FlexLayout
android:layout_width="match_parent"
android:layout_height="300dp"
app:align_item="center"
app:itemDividerWidth="5dp"
app:justify_content="start"
app:rowDividerHeight="5dp"
app:align_content="space_between">
    ...views that you want to be flex...
</org.houxg.flexlayout.FlexLayout>
```

0 comments on commit 6ffb502

Please sign in to comment.