GradientProtection
public class GradientProtection extends Protection
| java.lang.Object | ||
| ↳ | androidx.core.view.insets.Protection | |
| ↳ | androidx.core.view.insets.GradientProtection |
A type of protection which draws the gradient color.
Summary
Public constructors |
|---|
GradientProtection(int side)Creates an instance associated with a |
GradientProtection(int side, @ColorInt int color)Creates an instance associated with a |
Public methods |
|
|---|---|
@ColorInt int |
getColor()Gets the color associated with this protection. |
float |
getScale()Gets the scale of the thickness of the protection. |
void |
Sets the color to the protection. |
void |
setScale(float scale)Sets the scale of the thickness to the protection. |
Inherited methods |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
GradientProtection
public GradientProtection(int side)
Creates an instance associated with a WindowInsetsCompat.Side.
| Parameters | |
|---|---|
int side |
the given |
GradientProtection
public GradientProtection(int side, @ColorInt int color)
Creates an instance associated with a WindowInsetsCompat.Side.
| Parameters | |
|---|---|
int side |
the given |
@ColorInt int color |
The color to draw. |
Public methods
getColor
public @ColorInt int getColor()
Gets the color associated with this protection.
| Returns | |
|---|---|
@ColorInt int |
The color associated with this protection. |
getScale
public float getScale()
Gets the scale of the thickness of the protection.
| Returns | |
|---|---|
float |
The scale of the thickness. |