Class VisibilityTrackerExtsKt

    • 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 Boolean checkVisibility(View adView, Dimension minDimension) Checks if an ad view is visible based on its basic properties.
      final static Boolean checkVisibility(View adView, Rect adViewRect, Integer minPercentageViewable, Dimension minDimension) Checks if an ad view is visible based on its properties, visible area, and minimum percentage.
      final static Boolean isNotObstructed(View adView, Rect adViewRect, Integer minPercentageViewable, List<View> friendlyViews) Checks if an ad view is not obstructed by other views.
      final static Boolean isTransparent(View $self) Checks if a view has a transparent view.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • checkVisibility

         final static Boolean checkVisibility(View adView, Dimension minDimension)

        Checks if an ad view is visible based on its basic properties.

        This function checks if the ad view is visible, has a parent, is shown, and meets the minimum dimension requirements.

        Parameters:
        adView - The ad view to check.
        minDimension - The minimum dimension requirements.
        Returns:

        true if the ad view is visible, false otherwise.

      • checkVisibility

         final static Boolean checkVisibility(View adView, Rect adViewRect, Integer minPercentageViewable, Dimension minDimension)

        Checks if an ad view is visible based on its properties, visible area, and minimum percentage.

        This function checks if the ad view is visible, meets the minimum dimension requirements, and has a visible area that meets the minimum percentage requirement.

        Parameters:
        adView - The ad view to check.
        adViewRect - The rectangle representing the visible area of the ad view.
        minPercentageViewable - The minimum percentage of the ad view that must be visible.
        minDimension - The minimum dimension requirements.
        Returns:

        true if the ad view is visible, false otherwise.

      • isNotObstructed

         final static Boolean isNotObstructed(View adView, Rect adViewRect, Integer minPercentageViewable, List<View> friendlyViews)

        Checks if an ad view is not obstructed by other views.

        This function checks if the ad view is obstructed by any of its siblings in the view hierarchy. It considers friendly views as non-obstructing.

        Parameters:
        adView - The ad view to check.
        adViewRect - The rectangle representing the visible area of the ad view.
        minPercentageViewable - The minimum percentage of the ad view that must be visible.
        friendlyViews - The list of friendly views that should not be considered obstructions.
        Returns:

        true if the ad view is not obstructed, false otherwise.

      • isTransparent

         final static Boolean isTransparent(View $self)

        Checks if a view has a transparent view.

        This function checks if the view's background and foreground (if available) are transparent.

        Returns:

        true if the view has a transparent background, false otherwise.