Carousel Layout Manager
open class CarouselLayoutManager : RecyclerView.LayoutManager, Carousel, RecyclerView.SmoothScroller.ScrollVectorProvider
A LayoutManager that can mask and offset items along the scrolling axis, creating a unique list optimized for a stylized viewing experience.
CarouselLayoutManager requires all children to use MaskableFrameLayout as their root ViewGroup.
Note that when Carousel measures and lays out items, the first item in the adapter will be measured and it's desired size will be used to determine an appropriate size for all items in the carousel.
For more information, see the component developer guidance and design guidelines.
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Compute the extent of the horizontal scrollbar thumb.
Link copied to clipboard
Calculate the offset of the horizontal scrollbar thumb within the horizontal range.
Link copied to clipboard
Compute the horizontal range represented by the horizontal scroll bars.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Gets the height of the carousel container.
Link copied to clipboard
Gets the width of the carousel container.
Link copied to clipboard
Returns the masked, decorated bounds with margins for
view
.Link copied to clipboard
Returns the current orientation of the layout.
Link copied to clipboard
Link copied to clipboard
Whether or not the orientation is horizontal.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onFocusSearchFailed(@NonNull focused: View, focusDirection: Int, @NonNull recycler: RecyclerView.Recycler, @NonNull state: RecyclerView.State): View
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun requestChildRectangleOnScreen(@NonNull parent: RecyclerView, @NonNull child: View, @NonNull rect: Rect, immediate: Boolean, focusedChildVisible: Boolean): Boolean
Link copied to clipboard
open fun scrollHorizontallyBy(dx: Int, recycler: RecyclerView.Recycler, state: RecyclerView.State): Int
Link copied to clipboard
Link copied to clipboard
open fun scrollVerticallyBy(dy: Int, recycler: RecyclerView.Recycler, state: RecyclerView.State): Int
Link copied to clipboard
Sets the CarouselStrategy used by this layout manager to mask and offset child views as they move along the scrolling axis.
Link copied to clipboard
Enables features to help debug keylines and other internal layout manager logic.
Link copied to clipboard
Sets the orientation of the layout.
Link copied to clipboard
open fun smoothScrollToPosition(recyclerView: RecyclerView, state: RecyclerView.State, position: Int)