Skip to content

Most visited

Recently visited

navigation
Added in API level 20

View.OnApplyWindowInsetsListener

public static interface View.OnApplyWindowInsetsListener

android.view.View.OnApplyWindowInsetsListener


Listener for applying window insets on a view in a custom way.

Apps may choose to implement this interface if they want to apply custom policy to the way that window insets are treated for a view. If an OnApplyWindowInsetsListener is set, its onApplyWindowInsets method will be called instead of the View's own onApplyWindowInsets method. The listener may optionally call the parameter View's onApplyWindowInsets method to apply the View's normal behavior as part of its own.

Summary

Public methods

abstract WindowInsets onApplyWindowInsets(View v, WindowInsets insets)

When set on a View, this listener method will be called instead of the view's own onApplyWindowInsets method.

Public methods

onApplyWindowInsets

Added in API level 20
WindowInsets onApplyWindowInsets (View v, 
                WindowInsets insets)

When set on a View, this listener method will be called instead of the view's own onApplyWindowInsets method.

Parameters
v View: The view applying window insets
insets WindowInsets: The insets to apply
Returns
WindowInsets The insets supplied, minus any insets that were consumed
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.