Added in API level XE21
Defines the visual layouts for cards.
Refer to the “See Also” section of each layout to see which content is supported by the layout.
Inherited Methods | |
---|---|
From class.java.lang.Enum | |
final Object | clone() |
int | compareTo(Object arg0) |
final int | compareTo(E arg0) |
final boolean | equals(Object arg0) |
final void | finalize() |
final Class<E> | getDeclaringClass() |
final int | ordinal() |
String | toString() |
static <T extends Enum<T>> T | valueOf(Class<T> arg0, String arg1) |
From class java.lang.Object | |
Object | clone() |
boolean | equals(Object arg0) |
void | finalize() |
final Class<?> | getClass() |
int | hashCode() |
final void | notify() |
final void | notifyAll() |
String | toString() |
final void | wait() |
final void | wait(long arg0, int arg1) |
final void | wait(long arg0) |
From interface java.lang.Comparable | |
abstract int | compareTo(T arg0) |
Added in API level XE21
An alert with a large centered icon and a message and footnote underneath.
Added in API level XE21
Content with a focus on the author: an avatar with a heading and subheading, and body text underneath.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setHeading(CharSequence)
setIcon(Drawable)
setSubheading(CharSequence)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
Added in API level XE21
Images appear full screen in the background with a text caption and optional avatar at the bottom of the card.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setIcon(Drawable)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
Added in API level XE21
A two-column layout with images on the left and text on the right. The size of the text is dynamic based on the amount of content in the card.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setIcon(Drawable)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
Added in API level XE21
A two-column layout with images on the left and text on the right. The size of the text is fixed at 40 pixels. This layout should be used when displaying multiple cards of this type in a sequence, such as a scrolling list of restaurants or settings, and it is important to render each card at the same size for visual consistency.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setIcon(Drawable)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
Added in API level XE22
Allows a custom layout to be embedded inside a card that optionally has a standard footnote, timestamp, and stack indicator.
The embedded layout will be inflated inside a RelativeLayout
that is bounded within the standard margins of the card so that it does not overlap with the card’s footer.
Once you have called getView()
or getRemoteViews()
, you can call findViewById()
or standard RemoteViews
methods in order to access the views inside your embedded layout.
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
Added in API level XE21
Text with an optional icon centered in the card and an optional footnote underneath, like a menu item.
Added in API level XE21
Text that fills the whole card, with optional background images. The size of the text is dynamic based on the amount of content in the card.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
](CardBuilder.html#showStackIndicator(boolean)Added in API level XE21
Text that fills the whole card, with optional background images. The size of the text is fixed at 30 pixels. This layout should be used when using cards to display multiple pages of text and it is important to render each page at the same size for visual consistency.
addImage(Drawable)
setAttributionIcon(Drawable)
setFootnote(CharSequence)
setText(CharSequence)
setTimestamp(CharSequence)
showStackIndicator(boolean)
](CardBuilder.html#showStackIndicator(boolean)Added in API level XE21
Images appear full screen in the background with a name and optional icon centered at the bottom.
addImage(Drawable)
setIcon(Drawable)
setText(CharSequence)
showStackIndicator(boolean)
](CardBuilder.html#showStackIndicator(boolean)Portions of this page are reproduced from work created and shared by Google and used according to terms described in the Creative Commons 4.0 Attribution License.