Can Korkmaz
08/25/2022, 9:12 AMimageView.animateByResource(R.anim.shrink_animation) {
imageView.setScaleBoth(0f)
}
would that default to initial value at every compositon. Like adding a lifecycleEventObserver in update state, it would be added many times since it is added every recomposition. I pass update block as lambda parameter by the way. If the way I understand the update block mechanics is correct, then I should wrap updates that I want to execute only once in an Event, and use with getIfNotHandled(). Or with additional control blocks.Can Korkmaz
08/25/2022, 9:41 AMval cameraUpdate = remember<(CameraView)->Unit>{ // this goes inside AndroidView //update block
{c->
frameProcessorEvent.value.getIfNotHandled()?.let {
c.addFrameProcessor(it)
}
}
}
Can Korkmaz
08/25/2022, 10:30 AM