applyWindowInsetsWithTopPadding

public final static Unit applyWindowInsetsWithTopPadding(View $self, View paddingTargetView, Boolean displayCutout, Boolean navigationBars, Boolean statusBars)

applyWindowInsetsWithTopPadding From Android 15 onwards we have to support the edge to edge enforcement. In health example app and SDK we are going to use this method, so we can protect the view from display cut outs nav bars and status bars.

Parameters

paddingTargetView

: Because we are using action bars in many places for having the title of screen, in Android 15 onwards we were facing the issue that screen content was drawn under the status bar, so instead of giving top margin in every layout, we can pass the view to below method and it will add top padding to the content of screen equals to action bar's height, and it will only work for Android 15 onwards

Important Note: We need to remove this method and start using the custom material toolbar.