List Item Layout
A container layout for a List item.
This layout applies the following states according to its position in a list:
- android.R.attr.state_first
- android.R.attr.state_last
- android.R.attr.state_middle
- android.R.attr.state_single
Children of ListItemLayout that wish to be affected by the ListItemLayout's position state should duplicate the state through setting android.R.attr.duplicateParentState to true.
MaterialCardView is recommended as a ListItemLayout child, as it supports updating its shape / corners based on states.
ListItemLayout supports swipe-to-reveal via a single SwipeableListItem and up to 2 RevealableListItems. The SwipeableListItem and RevealableListItems must be direct children of the ListItemLayout. RevealableListItems can be set to the start or end of the SwipeableListItem via android:layout_gravity. There cannot be more than 1 RevealableListItem with the same layout_gravity.