public abstract class ViewOutlineProvider extends Object
Outline
, used for shadow casting and clipping.Modifier and Type | Field and Description |
---|---|
static 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.
|
static ViewOutlineProvider |
BOUNDS
Maintains the outline of the View to match its rectangular bounds,
at
1.0f alpha. |
static ViewOutlineProvider |
PADDED_BOUNDS
Maintains the outline of the View to match its rectangular padded bounds,
at
1.0f alpha. |
Constructor and Description |
---|
ViewOutlineProvider() |
Modifier and Type | Method and Description |
---|---|
abstract void |
getOutline(View view,
Outline outline)
Called to get the provider to populate the Outline.
|
public static final ViewOutlineProvider BACKGROUND
Drawable.getOutline(Outline)
public static final ViewOutlineProvider BOUNDS
1.0f
alpha.
This can be used to enable Views that are opaque but lacking a background cast a shadow.public static final ViewOutlineProvider PADDED_BOUNDS
1.0f
alpha.
This can be used to enable Views that are opaque but lacking a background cast a shadow.public abstract void getOutline(View view, Outline outline)
View.invalidateOutline()
is called
explicitly.
The input outline is empty and has an alpha of 1.0f
.view
- The view building the outline.outline
- The empty outline to be populated.