Skip to content

Commit fa7ea5a

Browse files
authored
Update README.md
1 parent 19e555e commit fa7ea5a

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# HashtagView
2-
### Version 1.3.0 available!
2+
### Version 1.3.1 available!
33

44
[![Join the chat at https://gitter.im/greenfrvr/hashtag-view](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/greenfrvr/hashtag-view?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55

@@ -26,15 +26,15 @@ Easily reference the library in your Android projects using this dependency in y
2626

2727
```Gradle
2828
dependencies {
29-
compile 'com.github.greenfrvr:hashtag-view:1.3.0'
29+
compile 'com.github.greenfrvr:hashtag-view:1.3.1'
3030
}
3131
```
3232

3333
or
3434

3535
```Gradle
3636
dependencies {
37-
compile ('com.github.greenfrvr:hashtag-view:1.3.0@aar'){
37+
compile ('com.github.greenfrvr:hashtag-view:1.3.1@aar'){
3838
transitive=true
3939
}
4040
}
@@ -257,3 +257,20 @@ To be able add and remove tags dynamically you should set dynamic mode to `true`
257257
returns true if item added successfully, false if item can't be added (in case `HastagView` already contains such item)
258258
- `HastagView.removeItem()`
259259
returns true if item removed successfully, false if item can't be removed (in case `HashtagView` doesn't contain such item)
260+
261+
## Distribution mode
262+
Distribution mode is responsible for sorting items by width inside each row. There are 5 different distribution modes available:
263+
- `RowDistribution.DISTRIBUTION_LEFT` wider items are on the left side of a row
264+
- `RowDistribution.DISTRIBUTION_MIDDLE` wider items are in the middle of a row
265+
- `RowDistribution.DISTRIBUTION_RIGHT` wider items are on the right side of a row
266+
- `RowDistribution.DISTRIBUTION_RANDOM` items are placed randomly inside a row
267+
- `RowDistribution.DISTRIBUTION_NONE` no sorting is applied
268+
269+
Default distribution mode is `DISTRIBUTION_NONE`. You can change it either via xml attributes or programmatically.
270+
271+
## Compose mode
272+
There are 2 different implementations of item positioning algorythms available:
273+
- `Compose.COMPOSE_ORIGIN` represents implementation of versions `1.2.1` and below. The idea of that implementation is to make all rows look even. It is achieved by sorting items by single item views width and putting items to rows according to greedy algorithm. This compose mode will change order of incoming items.
274+
- `Compose.COMPOSE_LINEAR` is available since version `1.3.0` implementation. It puts items in a row one by one until row is fullfiled, then next rows will be filled by the same rule. Using this compose mode with `RowDistribution.DISTRIBUTION_NONE` distribution option saves incoming items order as is.
275+
276+
Default compose mode is `COMPOSE_ORIGIN`. You can change it either via xml attributes or programmatically.

0 commit comments

Comments
 (0)