The Android Developer Challenge is back! Submit your idea before December 2.

BackgroundStyle

class BackgroundStyle
kotlin.Any
   ↳ androidx.car.widget.ListItemAdapter.BackgroundStyle

Constant class for background style of items.

Summary

Constants

static Int

Sets each item in CardView with a rounded corner background and shadow.

static Int

Sets the background color of each item to none (transparent).

static Int

Sets background of each item so the combined list looks like one elongated card, namely top and bottom item will have rounded corner at only top/bottom side respectively.

static Int

Sets the background color of each item.

Constants

CARD

static val CARD: Int

Sets each item in CardView with a rounded corner background and shadow.

Value: 2

NONE

static val NONE: Int

Sets the background color of each item to none (transparent).

Value: 1

PANEL

static val PANEL: Int

Sets background of each item so the combined list looks like one elongated card, namely top and bottom item will have rounded corner at only top/bottom side respectively. If only one item exists, it will have both top and bottom rounded corner.

Value: 3

SOLID

static val SOLID: Int

Sets the background color of each item. Background can be configured by R.styleable#ListItem_listItemBackgroundColor.

Value: 0