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
* The fading edges for a [LazyStaggeredGridState] scrollable content.
87
+
*
88
+
* The ComposeFadingEdges library highly recommends to use a [scrollConfig] with a provided [FadingEdgesScrollConfig.animationSpec], because staggered layout
89
+
* sometimes can be unpredicted and some items can be placed in the way that the interpolation between these items is too short or almost zero, which causes
90
+
* some fading edges jumps. Also, [LazyStaggeredGridState.layoutInfo] item spacing, before and after content paddings, causes some extra calculations, so if
91
+
* it is possible, add these padding to the items/cards instead, to improve performance.
92
+
*
93
+
* @property scrollConfig The fading edges scroll configuration.
94
+
* @property state The lazy list state.
95
+
* @property spanCount The staggered grid span count.
Copy file name to clipboardExpand all lines: ComposeFadingEdges/src/main/kotlin/com/gigamole/composefadingedges/content/scrollconfig/FadingEdgesScrollConfig.kt
* The fading edges scroll config for [FadingEdgesContentType.Scroll] and [FadingEdgesContentType.LazyList] types.
9
+
* The fading edges scroll config for [FadingEdgesContentType.Dynamic] types.
11
10
*
12
11
* The ComposeFadingEdges advises using an animation (custom or default [FadingEdgesScrollConfigDefaults.AnimationSpec]) to provide an interactive fading edges size
13
-
* transitions (due to the dynamic items size or partial content). Especially useful for [Dynamic].
12
+
* transitions (due to the dynamic items size or partial content).
* The dynamic fading edges scroll configuration interpolates their lengths on the scroll offset. The fading edges fade in when the content is away from the edges and
25
24
* fade out as it gets closer. The fading edges are fully hidden when the content size is not scrollable.
26
25
*
27
-
* The [isLerpByDifferenceForPartialContent] functionality is useful when the [FadingEdgesContentType.Scroll] or [FadingEdgesContentType.LazyList] combined content
28
-
* size (items size and offset) is slightly larger than the viewport size but smaller than the fading edges length. By enabling this feature, the fading edges can
29
-
* smoothly interpolate their scroll offset length by considering the partial content difference, rather than fading edges length.
26
+
* The [isLerpByDifferenceForPartialContent] functionality is useful when the [FadingEdgesContentType.Dynamic] combined content size (items size and offset) is
27
+
* slightly larger than the viewport size but smaller than the fading edges length. By enabling this feature, the fading edges can smoothly interpolate their scroll
28
+
* offset length by considering the partial content difference, rather than fading edges length.
30
29
*
31
30
* @property animationSpec The fading edges scroll animation specification.
32
31
* @property isLerpByDifferenceForPartialContent Determines whether the fading edges should interpolate their scroll offset length for partial content.
Copy file name to clipboardExpand all lines: ComposeFadingEdges/src/main/kotlin/com/gigamole/composefadingedges/content/scrollconfig/FadingEdgesScrollConfigDefaults.kt
* Determines whether the fading edges should interpolate their scroll offset length for partial content.
31
31
*
32
-
* This functionality is useful when the [FadingEdgesContentType.Scroll] or [FadingEdgesContentType.LazyList] combined content size (items size and offset) is
33
-
* slightly larger than the viewport size but smaller than the fading edges length. By enabling this feature, the fading edges can smoothly interpolate their
34
-
* scroll offset length by considering the partial content difference, rather than fading edges length.
32
+
* This functionality is useful when the [FadingEdgesContentType.Dynamic] combined content size (items size and offset) is slightly larger than the viewport size
33
+
* but smaller than the fading edges length. By enabling this feature, the fading edges can smoothly interpolate their scroll offset length by considering the
34
+
* partial content difference, rather than fading edges length.
0 commit comments