Class WindowInsetsHandler

  • All Implemented Interfaces:
    com.inmobi.ads.rendering.adactivity.insets.WindowInsetDispatcher.DispatcherListener

    
    public final class WindowInsetsHandler
     implements WindowInsetDispatcher.DispatcherListener
                        

    This class is responsible for handling the following:

    • listening to the window insets and get computed safeArea and notify the safeArea changes via WindowInsetListener listener

    • update the close button margins so that customClose button is shown within the safe area

    • cache the safe area via DisplayInfo for quicker access by template in the earlier load lifecycle stages.

    • provide a way to get WindowInsets values for internal components to adjust their paddings and margins.

    THIS OBJECT STORES VIEWS. MAKE SURE TO DESTROY IT WHEN THE ACTIVITY IS DESTROYED.

    Refer to - Design Doc https://inmobi.atlassian.net/wiki/spaces/SSP/pages/edit-v2/119955816456

    Author:

    manoj.krishnan