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
manoj.krishnan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWindowInsetsHandler.FinalInsetspublic classWindowInsetsHandler.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static WindowInsetsHandler.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description WindowInsetsHandler(View view, WindowInsetListener windowInsetListener, InMobiLogger logger)WindowInsetsHandler(Activity activity, WindowInsetListener windowInsetListener, InMobiLogger logger)
-
Method Summary
Modifier and Type Method Description UnitonInsetsUpdated(WindowInsets windowInsets)final WindowInsetsHandler.FinalInsetsgetFinalInsets()final Unitdestroy()final UnitsetFinalInsets(Integer navigationBarType, WindowInsetsHandler.FinalInsets finalInsets)final UnitsetOrientation(Orientation orientation)-
-
Constructor Detail
-
WindowInsetsHandler
WindowInsetsHandler(View view, WindowInsetListener windowInsetListener, InMobiLogger logger)
-
WindowInsetsHandler
WindowInsetsHandler(Activity activity, WindowInsetListener windowInsetListener, InMobiLogger logger)
-
-
Method Detail
-
onInsetsUpdated
Unit onInsetsUpdated(WindowInsets windowInsets)
-
getFinalInsets
final WindowInsetsHandler.FinalInsets getFinalInsets()
-
setFinalInsets
final Unit setFinalInsets(Integer navigationBarType, WindowInsetsHandler.FinalInsets finalInsets)
-
setOrientation
final Unit setOrientation(Orientation orientation)
-
-
-
-