micro_utils.dokka
0.15.1

# FlowOnHierarchyChangeListener

class FlowOnHierarchyChangeListener(recursive: Boolean = false, _onChildViewAdded: MutableSharedFlow<Pair<View, View>> = MutableSharedFlow(extraBufferCapacity = Int.MAX_VALUE), _onChildViewRemoved: MutableSharedFlow<Pair<View, View>> = MutableSharedFlow(extraBufferCapacity = Int.MAX_VALUE)) : ViewGroup.OnHierarchyChangeListener

kotlinx.coroutines.flow.Flow-based android.view.ViewGroup.OnHierarchyChangeListener

#### Parameters

recursive

If set, any call of onChildViewAdded will check if child View is ViewGroup and subscribe to this ViewGroup too

_onChildViewAdded

Internal MutableSharedFlow which will be used to pass data to onChildViewAdded flow

_onChildViewRemoved

Internal MutableSharedFlow which will be used to pass data to onChildViewRemoved flow

## Constructors

FlowOnHierarchyChangeListener
Link copied to clipboard
fun FlowOnHierarchyChangeListener(recursive: Boolean = false, _onChildViewAdded: MutableSharedFlow<Pair<View, View>> = MutableSharedFlow(extraBufferCapacity = Int.MAX_VALUE), _onChildViewRemoved: MutableSharedFlow<Pair<View, View>> = MutableSharedFlow(extraBufferCapacity = Int.MAX_VALUE))

## Functions

onChildViewAdded
Link copied to clipboard
open override fun onChildViewAdded(parent: View, child: View)

Will emit data into onChildViewAdded flow. If recursive is true and child is ViewGroup will also subscribe to child hierarchy changes.

onChildViewRemoved
Link copied to clipboard
open override fun onChildViewRemoved(parent: View, child: View)

Just emit data into onChildViewRemoved

## Properties

onChildViewAdded
Link copied to clipboard
val onChildViewAdded: SharedFlow<Pair<View, View>>
onChildViewRemoved
Link copied to clipboard
val onChildViewRemoved: SharedFlow<Pair<View, View>>