HorizontalGridView
open class HorizontalGridView : BaseGridView
kotlin.Any | |||||
↳ | android.view.View | ||||
↳ | android.view.ViewGroup | ||||
↳ | androidx.recyclerview.widget.RecyclerView | ||||
↳ | androidx.leanback.widget.BaseGridView | ||||
↳ | androidx.leanback.widget.HorizontalGridView |
A android.view.ViewGroup
that shows items in a horizontal scrolling list. The items come from the RecyclerView.Adapter
associated with this view.
RecyclerView.Adapter
can optionally implement FacetProviderAdapter
which provides FacetProvider
for a given view type; RecyclerView.ViewHolder
can also implement FacetProvider
. Facet from ViewHolder has a higher priority than the one from FacetProviderAdapter associated with viewType. Supported optional facets are:
-
ItemAlignmentFacet
When this facet is provided by ViewHolder or FacetProviderAdapter, it will override the item alignment settings set on HorizontalGridView. This facet also allows multiple alignment positions within one ViewHolder.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyle: Int) |
Public methods | |
---|---|
open Unit | |
Boolean |
Returns true if left edge fading is enabled. |
Int |
Returns the left edge fading length in pixels. |
Int |
Returns the distance in pixels between fading start position and left padding edge. |
Boolean |
Returns true if fading right edge is enabled. |
Int |
Returns the right edge fading length in pixels. |
Int |
Sets the distance in pixels between fading start position and right padding edge. |
Unit |
setFadingLeftEdge(fading: Boolean) Sets the fade out left edge to transparent. |
Unit |
setFadingLeftEdgeLength(fadeLength: Int) Sets the left edge fading length in pixels. |
Unit |
setFadingLeftEdgeOffset(fadeOffset: Int) Sets the distance in pixels between fading start position and left padding edge. |
Unit |
setFadingRightEdge(fading: Boolean) Sets the fade out right edge to transparent. |
Unit |
setFadingRightEdgeLength(fadeLength: Int) Sets the right edge fading length in pixels. |
Unit |
setFadingRightEdgeOffset(fadeOffset: Int) Returns the distance in pixels between fading start position and right padding edge. |
open Unit |
setNumRows(numRows: Int) Sets the number of rows. |
open Unit |
setRowHeight(height: Int) Sets the row height. |
Protected methods | |
---|---|
open Unit |
initAttributes(context: Context!, attrs: AttributeSet!) |
Inherited functions | |
---|---|