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.

CARD_TYPE_INFO_UNDER_WITH_EXTRA

public static final int CARD_TYPE_INFO_UNDER_WITH_EXTRA

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. The info area appears below the main
area, causing the total card height to change. The extra area animates in
at the bottom of the card, shifting up the info view without affecting
the card height.

getInfoVisibility

isSelectedAnimationDelayed

Returns a boolean indicating if the selected animation will run
immediately or be delayed the next time the card is Selected.

Returns

boolean

true if this card is set to delay the selected animation the next
time it is selected, or false if the selected animation will run
immediately the next time the card is selected.

setActivated

public void setActivated (boolean activated)

Sets the Activated state of this Card. This can trigger changes in the
card layout, resulting in views to become visible or hidden. A card is
normally set to Activated state when its parent container (like a Row)
receives focus, and then activates all of its children.

setSelected

public void setSelected (boolean selected)

Sets the Selected state of this Card. This can trigger changes in the
card layout, resulting in views to become visible or hidden. A card is
normally set to Selected state when it receives input focus.

setSelectedAnimationDelayed

public void setSelectedAnimationDelayed (boolean delay)

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. The default behavior is to delay this
animation. This is a one-shot override. If set to false, after the card
is selected and the selected animation is triggered, this flag is
automatically reset to true. This is useful when you want to change the
default behavior, and have the selected animation run immediately. One
such case could be when focus moves from one row to the other, when
instead of delaying the selected animation until the user pauses on a
card, it may be desirable to trigger the animation for that card
immediately.

Parameters

delay

boolean: True (default) if the selected animation should be delayed
after the card is selected, or false if the animation should
run immediately the next time the card is Selected.