Skip to content

Commit

Permalink
Update readme and doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3z committed Aug 23, 2017
1 parent 83d292b commit e102b7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A FlowLayout for Android, which allows child views flow to next row when there i
## Gradle

```
compile 'com.nex3z:flow-layout:0.1.4'
compile 'com.nex3z:flow-layout:1.0.0'
```


Expand All @@ -21,9 +21,9 @@ compile 'com.nex3z:flow-layout:0.1.4'
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:childSpacing="auto"
app:childSpacingForLastRow="align"
app:rowSpacing="8dp">
app:flChildSpacing="auto"
app:flChildSpacingForLastRow="align"
app:flRowSpacing="8dp">

<TextView
android:layout_width="wrap_content"
Expand All @@ -43,13 +43,14 @@ compile 'com.nex3z:flow-layout:0.1.4'

## Attributes

| Attribute | Format | Description |
|------------------------|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| flow | boolean | `true` to allow flow. `false` to restrict all child views in one row. The default is `true`. |
| childSpacing | `auto`/dimension | The horizontal spacing between child views. Either `auto`, or a fixed size. The default is 0dp. |
| childSpacingForLastRow | `auto`/`align`/<br>dimension | The horizontal spacing between child views of the last row. Either `auto`, `align` or a fixed size. If not set, `childSpacing` will be used instead. |
| rowSpacing | `auto`/dimension | The vertical spacing between rows. Either `auto`, or a fixed size. The default is 0dp. |
| rtl | boolean | `true` to layout child views from right to left. `false` to layout from left to right. The default is `false`. |
| Attribute | Format | Description |
|--------------------------|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| flFlow | boolean | `true` to allow flow. `false` to restrict all child views in one row. The default is `true`. |
| flChildSpacing | `auto`/dimension | The horizontal spacing between child views. Either `auto`, or a fixed size. The default is 0dp. |
| flChildSpacingForLastRow | `auto`/`align`/<br>dimension | The horizontal spacing between child views of the last row. Either `auto`, `align` or a fixed size. If not set, `childSpacing` will be used instead. |
| flRowSpacing | `auto`/dimension | The vertical spacing between rows. Either `auto`, or a fixed size. The default is 0dp. |
| flRtl | boolean | `true` to layout child views from right to left. `false` to layout from left to right. The default is `false`. |
| flMaxRows | integer | The maximum height of FlowLayout in terms of number of rows. |

`auto` means that the actual spacing is calculated as per the size of the `FlowLayout` and the number of child views (or rows), so that the child views (or rows) are placed evenly.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public int getMaxRows() {
}

/**
* Sets the number of row of the FlowLayout to be at most maxRows size.
* Sets the height of the FlowLayout to be at most maxRows tall.
*
* @param maxRows The maximum number of rows.
*/
Expand Down

0 comments on commit e102b7c

Please sign in to comment.