Colton Idle
08/25/2021, 3:39 PMalign
, but it works fine if I just drop this image code into a Box. How can I make a reusable bottomAlignedImage composable like this?
@Composable
fun bottomAlignedImage(){
Image(
modifier = Modifier.fillMaxWidth().align(Alignment.BottomCenter),
painter = painterResource(id = R.drawable.myImage),
contentDescription = null
)}
nitrog42
08/25/2021, 3:43 PMfun bottomAlignedImage(modifier: Modifier = Modifier) {
Image(modifier = modifier...)
->
bottomAlignedImage(Modifier.align(Alignement.BottomCenter)
Which is probably not what you planned (hence the name 😄 )nitrog42
08/25/2021, 3:44 PM@Composable
fun BoxScope.bottomAlignedImage(){
Colton Idle
08/25/2021, 3:49 PM