Android Builders Weblog: Put on OS Tiles Materials Library: Construct Tiles, Quick.

    0
    40


    val theme = Colours(

        /*main=*/ 0xFFD0BCFF.toInt(), /*onPrimary=*/ 0xFF381E72.toInt(),

        /*floor=*/ 0xFF202124.toInt(), /*onSurface=*/ 0xFFFFFFFF.toInt()

    )

    val buttonColors = ButtonColors.secondaryButtonColors(theme)

    val chipColors = ChipColors.primaryChipColors(theme)

    val timeline = Timeline.fromLayoutElement(
        PrimaryLayout.Builder(deviceParameters)

            .setPrimaryLabelTextContent(

                Textual content.Builder(this, “1 run this week”)

                    .setTypography(Typography.TYPOGRAPHY_CAPTION1)

                    .setColor(argb(theme.main))

                    .construct()

            )

            .setContent(

                MultiButtonLayout.Builder()

                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent(“icon_run”)

                            .setButtonColors(buttonColors)

                            .setContentDescription(“Run”)

                            .construct()

                    )

                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent(“icon_yoga”)

                            .setButtonColors(buttonColors)

                            .setContentDescription(“Yoga”)

                            .construct()

                    )
                    .addButtonContent(

                        Button.Builder(this, clickable)

                            .setIconContent(“icon_cycle”)

                            .setButtonColors(buttonColors)

                            .setContentDescription(“Cycle”)

                            .construct()

                    )

                    .construct()

            )

            .setPrimaryChipContent(

                CompactChip.Builder(this, “Extra”, clickable, deviceParameters)

                    .setChipColors(chipColors)

                    .construct()

            )

            .construct()

    )

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here