GridSection | API reference | Android Developers (original) (raw)
@ExperimentalCarApi
@CarProtocol
public final class GridSection extends Section
A section within the SectionedItemTemplate that contains [GridItem](/reference/androidx/car/app/model/GridItem)s - good for showcase large artwork or images for every entry.
Summary
| Constants | |
|---|---|
| static final int | ITEM_IMAGE_SHAPE_CIRCLE = 2 Renders the image within the grid item in the shape of a circle by cropping it. |
| static final int | ITEM_IMAGE_SHAPE_UNSET = 1 Renders the image within the grid item as-is without modifying its shape - this is the default. |
| static final int | ITEM_SIZE_EXTRA_LARGE = 4 Renders the items within the section in an extra large sized format. |
| static final int | ITEM_SIZE_LARGE = 3 Renders the items within the section in a large format. |
| static final int | ITEM_SIZE_MEDIUM = 2 Renders the items within the section in a medium sized format. |
| static final int | ITEM_SIZE_SMALL = 1 Renders the items within the section in a small format - this is the default. |
Constants
ITEM_IMAGE_SHAPE_CIRCLE
public static final int ITEM_IMAGE_SHAPE_CIRCLE = 2
Renders the image within the grid item in the shape of a circle by cropping it.
ITEM_IMAGE_SHAPE_UNSET
public static final int ITEM_IMAGE_SHAPE_UNSET = 1
Renders the image within the grid item as-is without modifying its shape - this is the default.
public static final int ITEM_SIZE_EXTRA_LARGE = 4
Renders the items within the section in an extra large sized format.
ITEM_SIZE_LARGE
public static final int ITEM_SIZE_LARGE = 3
Renders the items within the section in a large format.
ITEM_SIZE_MEDIUM
public static final int ITEM_SIZE_MEDIUM = 2
Renders the items within the section in a medium sized format.
ITEM_SIZE_SMALL
public static final int ITEM_SIZE_SMALL = 1
Renders the items within the section in a small format - this is the default.
Public methods
getItemImageShape
public int getItemImageShape()
Returns the shape which this section's grid item images should be rendered to.
getItemSize
public int getItemSize()
Returns the size which this section's grid items should be rendered at.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-11-19 UTC.