GridItem

public final class GridItem
extends Object implements Item

java.lang.Object
   ↳ androidx.car.app.model.GridItem


Represents a grid item with an image and an optional title.

Summary

Nested classes

class GridItem.Builder

A builder of GridItem

Constants

int IMAGE_TYPE_ICON

Represents an icon to be displayed in the grid item.

int IMAGE_TYPE_LARGE

Represents a large image to be displayed in the grid item.

Public methods

boolean equals(Object other)
CarIcon getImage()

Returns the image of the grid item or null if not set.

int getImageType()

Returns the image type of the grid item.

OnClickDelegate getOnClickDelegate()

Returns the OnClickDelegate to be called back when the grid item is clicked or null if the grid item is non-clickable.

CarText getText()

Returns the text to display below the title or null if no text will be displayed below the title.

CarText getTitle()

Returns the title of the grid item or null if not set.

int hashCode()
boolean isLoading()

Returns whether the grid item is in a loading state.

String toString()

Inherited methods