BaseCardView
open class BaseCardView : FrameLayout
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.FrameLayout | |||
↳ | androidx.leanback.widget.BaseCardView |
A card style layout that responds to certain state changes. It arranges its children in a vertical column, with different regions becoming visible at different times.
A BaseCardView will draw its children based on its type, the region visibilities of the child types, and the state of the widget. A child may be marked as belonging to one of three regions: main, info, or extra. The main region is always visible, while the info and extra regions can be set to display based on the activated or selected state of the View. The card states are set by calling setActivated
and setSelected
.
See BaseCardView.LayoutParams
for layout attributes.
Summary
Nested classes | |
---|---|
open |
Per-child layout information associated with BaseCardView. |
Constants | |
---|---|
static Int |
Indicates that a card region is visible when the card is activated. |
static Int |
Indicates that a card region is always visible. |
static Int |
Indicates that a card region is visible when the card is selected. |
static Int |
A Card type with 2 layout areas: A main area which is always visible, and an info area that fades in over the main area when it is visible. |
static Int |
A Card type with 2 layout areas: A main area which is always visible, and an info area that appears below the main area. |
static Int |
A Card type with 3 layout areas: A main area which is always visible; an info area which will appear below the main area, and an extra area that only appears after a short delay. |
static Int |
A simple card type with a single layout area. |
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
Public methods | |
---|---|
open BaseCardView.LayoutParams! |
generateLayoutParams(attrs: AttributeSet!) |
open Int |
Returns the type of this Card. |
open Int |
Returns the visibility of the extra region of the card. |
open Int |
Returns the visibility of the info region of the card. |
open Boolean |
Returns a boolean indicating if the selected animation will run immediately or be delayed the next time the card is Selected. |
open Unit |
setActivated(activated: Boolean) Sets the Activated state of this Card. |
open Unit |
setCardType(type: Int) Sets the type of this Card. |
open Unit |
setExtraVisibility(visibility: Int) Sets the visibility of the extra region of the card. |
open Unit |
setInfoVisibility(visibility: Int) Sets the visibility of the info region of the card. |
open Unit |
setSelected(selected: Boolean) Sets the Selected state of this Card. |
open Unit |
setSelectedAnimationDelayed(delay: Boolean) Sets a flag indicating if the Selected animation (if the selected card type implements one) should run immediately after the card is selected, or if it should be delayed. |
open Boolean | |
open String |
toString() |
Protected methods | |
---|---|
open Boolean | |
open BaseCardView.LayoutParams! | |
open BaseCardView.LayoutParams! | |
open IntArray! |
onCreateDrawableState(extraSpace: Int) |
open Unit | |
open Unit |