-
public final class ViewBindingExtensionsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static CoroutineScopeviewScope
-
Method Summary
Modifier and Type Method Description final CoroutineScopegetViewScope()final static UnitshowIfTrue(ViewBinding $self, Boolean condition)final static UnithideIfTrue(ViewBinding $self, Boolean condition)final static <T extends Any> JobcollectFlow(ViewBinding $self, Flow<T> flow, SuspendFunction1<T, Unit> call)final static Unitshow(ViewBinding $self)final static Unithide(ViewBinding $self)final static UnitcleanUpRecyclerAdapters(ViewBinding $self)final static <VB extends ViewBinding> ReadOnlyProperty<AppCompatActivity, VB>viewBinding(AppCompatActivity $self, Function1<LayoutInflater, VB> bindingInflater)Creates a ViewBinding delegate object, allowing us to declare it at the top of our AppCompatActivity like so: private val binding by viewBinding(MyActivityBinding::inflate)final static <VB extends ViewBinding> ReadOnlyProperty<Fragment, VB>viewBinding(Fragment $self, Function1<View, VB> viewBindingFactory)Creates a ViewBinding delegate object, allowing us to declare it at the top of our Fragment like so: private val binding by viewBinding(MyFragmentBinding::bind)-
-
Method Detail
-
getViewScope
final CoroutineScope getViewScope()
-
showIfTrue
final static Unit showIfTrue(ViewBinding $self, Boolean condition)
-
hideIfTrue
final static Unit hideIfTrue(ViewBinding $self, Boolean condition)
-
collectFlow
final static <T extends Any> Job collectFlow(ViewBinding $self, Flow<T> flow, SuspendFunction1<T, Unit> call)
-
cleanUpRecyclerAdapters
final static Unit cleanUpRecyclerAdapters(ViewBinding $self)
-
viewBinding
final static <VB extends ViewBinding> ReadOnlyProperty<AppCompatActivity, VB> viewBinding(AppCompatActivity $self, Function1<LayoutInflater, VB> bindingInflater)
Creates a ViewBinding delegate object, allowing us to declare it at the top of our AppCompatActivity like so:
private val binding by viewBinding(MyActivityBinding::inflate)
-
viewBinding
final static <VB extends ViewBinding> ReadOnlyProperty<Fragment, VB> viewBinding(Fragment $self, Function1<View, VB> viewBindingFactory)
Creates a ViewBinding delegate object, allowing us to declare it at the top of our Fragment like so:
private val binding by viewBinding(MyFragmentBinding::bind)
-
-
-
-