-
public final class CallContainterViewBindingKt
-
-
Method Summary
Modifier and Type Method Description final static UnitbindView(CallContainerView $self, CallViewModel viewModel, LifecycleOwner lifecycleOwner, Function2<CallDeviceState, Boolean, List<CallControlItem>> fetchCallMediaState, Function0<Unit> onParticipantsPressed, Function0<Unit> onBackPressed, Function0<Unit> onIdle)Binds CallContainerView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed. -
-
Method Detail
-
bindView
final static Unit bindView(CallContainerView $self, CallViewModel viewModel, LifecycleOwner lifecycleOwner, Function2<CallDeviceState, Boolean, List<CallControlItem>> fetchCallMediaState, Function0<Unit> onParticipantsPressed, Function0<Unit> onBackPressed, Function0<Unit> onIdle)
Binds CallContainerView with CallViewModel, updating the view's state based on data provided by the ViewModel, and propagating view events to the ViewModel as needed.
This function sets listeners on the view and ViewModel. Call this method before setting any additional listeners on these objects yourself.
- Parameters:
viewModel- CallViewModel for observing data and running actions.lifecycleOwner- The lifecycle owner, root component containing CallContainerView.fetchCallMediaState- Handler used to fetch the new state of the call controls buttons when the media state changes.onBackPressed- Handler that notifies when the back button has been pressed.onIdle- Handler that notifies when the call has entered the idle state, notifies about end of the call.
-
-
-
-