ViewportFiller

class ViewportFiller(width: Int, height: Int, orientation: Int) : LayoutInfo.ViewportFiller

Simple implementation of LayoutInfo.ViewportFiller which fills the viewport by laying out items sequentially.

Constructors

Link copied to clipboard
constructor(width: Int, height: Int, orientation: Int)

Functions

Link copied to clipboard
open override fun add(renderInfo: RenderInfo, width: Int, height: Int)

This will be called to inform implementations that the next layout has been computed. Implementations should use the width/height to determine whether they still need more views to fill their initial viewport (which should be reflected in the next call to wantsMore

Link copied to clipboard
open override fun getFill(): Int

Return the fill along the main axis (i.e. height for VERTICAL and width for HORIZONTAL), this method is available after ViewportFiller.add is called.

Link copied to clipboard
open override fun wantsMore(): Boolean

Implementations should return true if they need more views to be computed in order to fill the screen.