belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
HorizontalGridView
public
class
HorizontalGridView
extends BaseGridView
java.lang.Object | |||||
↳ | android.view.View | ||||
↳ | android.view.ViewGroup | ||||
↳ | android.support.v7.widget.RecyclerView | ||||
↳ | android.support.v17.leanback.widget.BaseGridView | ||||
↳ | android.support.v17.leanback.widget.HorizontalGridView |
A 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 XML attributes | |
---|---|
![]()
android.support.v7.widget.RecyclerView
|
Inherited constants |
---|
![]()
android.support.v17.leanback.widget.BaseGridView
|
![]()
android.support.v7.widget.RecyclerView
|
![]()
android.view.ViewGroup
|
![]()
android.view.View
|
Inherited fields |
---|
![]()
android.view.View
|
Public constructors | |
---|---|
HorizontalGridView(Context context)
|
|
HorizontalGridView(Context context, AttributeSet attrs)
|
|
HorizontalGridView(Context context, AttributeSet attrs, int defStyle)
|
Public methods | |
---|---|
void
|
draw(Canvas canvas)
|
final
boolean
|
getFadingLeftEdge()
Returns true if left edge fading is enabled. |
final
int
|
getFadingLeftEdgeLength()
Returns the left edge fading length in pixels. |
final
int
|
getFadingLeftEdgeOffset()
Returns the distance in pixels between fading start position and left padding edge. |
final
boolean
|
getFadingRightEdge()
Returns true if fading right edge is enabled. |
final
int
|
getFadingRightEdgeLength()
Returns the right edge fading length in pixels. |
final
int
|
getFadingRightEdgeOffset()
Sets the distance in pixels between fading start position and right padding edge. |
final
void
|
setFadingLeftEdge(boolean fading)
Sets the fade out left edge to transparent. |
final
void
|
setFadingLeftEdgeLength(int fadeLength)
Sets the left edge fading length in pixels. |
final
void
|
setFadingLeftEdgeOffset(int fadeOffset)
Sets the distance in pixels between fading start position and left padding edge. |