mr0xf00 / easycrop

Image cropper for jetpack compose
Apache License 2.0
81 stars 17 forks source link

Change the action bar color #9

Closed d7coders closed 9 months ago

d7coders commented 10 months ago

how to change the action bar color? Screenshot_1689768126

dev-weiqi commented 9 months ago

maybe you could try to provide your own header:

    ImageCropperDialog(
        state = state,
        topBar = {
            TopAppBar(
                backgroundColor = Color.Yellow,  👈👈👈 
                title = {},
                navigationIcon = {
                    IconButton(onClick = { state.done(accept = false) }) {
                        Icon(Icons.Default.ArrowBack, null)
                    }
                },
                actions = {
                    IconButton(onClick = { state.reset() }) {
                        Icon(painterResource(R.drawable.restore), null)
                    }
                    IconButton(onClick = { state.done(accept = true) }, enabled = !state.accepted) {
                        Icon(Icons.Default.Done, null)
                    }
                }
            )
        }
    )