Class ViewHierarchyHandlerKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <Error class: unknown class> observeViewAttachedToParent(View view, View parentView, CoroutineScope coroutineScope) Observes whether the given view is attached to the parentView in the view hierarchy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • observeViewAttachedToParent

         final static <Error class: unknown class> observeViewAttachedToParent(View view, View parentView, CoroutineScope coroutineScope)

        Observes whether the given view is attached to the parentView in the view hierarchy.

        This function creates a reactive flow that monitors the attachment state of a view relative to its parent view. It emits true when the view is attached to both the parent view and the window, and false otherwise. The observation is handled asynchronously using coroutines and is managed within the provided scope.

        Parameters:
        view - The child View to observe for attachment state changes
        parentView - The parent View to check attachment against
        coroutineScope - The CoroutineScope for managing the observation lifecycle
        Returns:

        A StateFlow<Boolean> that emits true when the view is properly attached, false otherwise