CardBuilder.Layout

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

Enum Values

Added in API level XE21

public static final CardBuilder.Layout ALERT

An alert with a large centered icon and a message and footnote underneath.

Added in API level XE21

public static final CardBuilder.Layout AUTHOR

Added in API level XE21

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.

Added in API level XE21

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.

Added in API level XE21

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.

Added in API level XE22

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.

Added in API level XE21

public static final CardBuilder.Layout MENU

Text with an optional icon centered in the card and an optional footnote underneath, like a menu item.

Added in API level XE21

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.

Added in API level XE21

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.

Added in API level XE21

public static final CardBuilder.Layout TITLE

Images appear full screen in the background with a name and optional icon centered at the bottom.