Skip to content

Most visited

Recently visited

navigation

ViewOutlineProvider

public abstract class ViewOutlineProvider
extends Object

java.lang.Object
   ↳ android.view.ViewOutlineProvider


Interface by which a View builds its Outline, used for shadow casting and clipping.

Summary

Fields

public static final ViewOutlineProvider BACKGROUND

Default outline provider for Views, which queries the Outline from the View's background, or generates a 0 alpha, rectangular Outline the size of the View if a background isn't present.

public static final ViewOutlineProvider BOUNDS

Maintains the outline of the View to match its rectangular bounds, at 1.0f alpha.

public static final ViewOutlineProvider PADDED_BOUNDS

Maintains the outline of the View to match its rectangular padded bounds, at 1.0f alpha.

Public constructors

ViewOutlineProvider()

Public methods

abstract void getOutline(View view, Outline outline)

Called to get the provider to populate the Outline.

Inherited methods

From class java.lang.Object

Fields

BACKGROUND

added in API level 21
ViewOutlineProvider BACKGROUND

Default outline provider for Views, which queries the Outline from the View's background, or generates a 0 alpha, rectangular Outline the size of the View if a background isn't present.

See also:

BOUNDS

added in API level 21
ViewOutlineProvider BOUNDS

Maintains the outline of the View to match its rectangular bounds, at 1.0f alpha. This can be used to enable Views that are opaque but lacking a background cast a shadow.

PADDED_BOUNDS

added in API level 21
ViewOutlineProvider PADDED_BOUNDS

Maintains the outline of the View to match its rectangular padded bounds, at 1.0f alpha. This can be used to enable Views that are opaque but lacking a background cast a shadow.

Public constructors

ViewOutlineProvider

added in API level 21
ViewOutlineProvider ()

Public methods

getOutline

added in API level 21
void getOutline (View view, 
                Outline outline)

Called to get the provider to populate the Outline. This method will be called by a View when its owned Drawables are invalidated, when the View's size changes, or if invalidateOutline() is called explicitly. The input outline is empty and has an alpha of 1.0f.

Parameters
view View: The view building the outline.

outline Outline: The empty outline to be populated.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

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.

Take a one-minute survey?
Help us improve Android tools and documentation.