Different cars can allow for differing numbers of
Item instances to be displayed to the user at a time. Use the
ConstraintManager to check the content limit at runtime and to set the
appropriate number of items in your templates.
Get a ConstraintManager from the CarContext:
val manager = carContext.getCarService(ConstraintManager::class.java)
Query the retrieved ConstraintManager object for the relevant content limit.
For example, to get the number of items that can be displayed in a grid, call
getContentLimit with CONTENT_LIMIT_TYPE_GRID:
val gridItemLimit = manager.getContentLimit(ConstraintManager.CONTENT_LIMIT_TYPE_GRID)