You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# HashtagView
2
-
### Version 1.3.0 available!
2
+
### Version 1.3.1 available!
3
3
4
4
[](https://gitter.im/greenfrvr/hashtag-view?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5
5
@@ -26,15 +26,15 @@ Easily reference the library in your Android projects using this dependency in y
@@ -257,3 +257,20 @@ To be able add and remove tags dynamically you should set dynamic mode to `true`
257
257
returns true if item added successfully, false if item can't be added (in case `HastagView` already contains such item)
258
258
-`HastagView.removeItem()`
259
259
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