Create TopAppBar&FloatingActionbutton jetpack

PHOTO EMBED

Wed Sep 06 2023 06:33:22 GMT+0000 (Coordinated Universal Time)

Saved by @iliya #kotlin #android

@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
    @Preview(showBackground = true)
    @Composable
    fun scaffold() {
        Scaffold(
            topBar = {
                TopAppBar {
                    Text(text = stringResource(id = R.string.app_name))
                }
            },
            bottomBar = {
                BottomAppBar(
                    cutoutShape = MaterialTheme.shapes.small.copy(CornerSize(percent = 50))
                ) {

                }
            },
            floatingActionButton = {
                FloatingActionButton(onClick = { /*TODO*/ }) {
                    Icon(Icons.Filled.Add, contentDescription = "")
                }
            },
            isFloatingActionButtonDocked = true
        ) {
            main()
        }
    }
content_copyCOPY

https://snipsave.com/user/iliyafda/snippet/KuvAIDcTtaKEwg9i5A/