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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Enum Values
public static final CardBuilder.Layout ALERT
An alert with a large centered icon and a message and footnote underneath.
public static final CardBuilder.Layout AUTHOR
Content with a focus on the author: an avatar with a heading and subheading, and body text underneath.
public static final CardBuilder.Layout CAPTION
Images appear full screen in the background with a text caption and optional avatar at the bottom of the card.
public static final CardBuilder.Layout COLUMNS
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.
public static final CardBuilder.Layout COLUMNS_FIXED
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.
public static final CardBuilder.Layout EMBED_INSIDE
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.
public static final CardBuilder.Layout MENU
Text with an optional icon centered in the card and an optional footnote underneath, like a menu item.
public static final CardBuilder.Layout TEXT
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.
public static final CardBuilder.Layout TEXT_FIXED
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.
public static final CardBuilder.Layout TITLE
Images appear full screen in the background with a name and optional icon centered at the bottom.