Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 1.41 KB

Double_Header_LazyColumn.md

File metadata and controls

44 lines (35 loc) · 1.41 KB

DoubleHeaderLazyColumn

How to use

To implement the double header LazyColumn your data should override the Item class:

open class Item(
    /* This String here defines a header */
    open val type: String,
    
    /* This String here defines subheader */
    open val subType: String
)

All of the above properties should be filled for the double header LazyColumn to work correctly. To render your data you should call this Composable function:

fun DoubleHeaderLazyColumn(
    /* The data which inherit from Item class */
    data: List<Item>, // -> 
    
    modifier: Modifier,
    
    /* Header Composable */
    headerContent: @Composable (String) -> Unit,
    
    /* Subheader Composable */
    subHeaderContent: @Composable (String) -> Unit,
    
    /* Composable for each item */
    itemContent: @Composable (Item) -> Unit)
)

Examples

You can find a code example here.

If you want to see how it looks like, check this video.