RoundedCornerCompat
public final class RoundedCornerCompat
Represents a rounded corner of the display.
Note: The center coordinates and radius are an approximation of the actual display corner (based on the display's rounded corner shape).
RoundedCornerCompat is immutable.
Summary
Constants |
|
|---|---|
static final int |
The rounded corner is at the bottom-left of the screen. |
static final int |
The rounded corner is at the bottom-right of the screen. |
static final int |
The rounded corner is at the top-left of the screen. |
static final int |
The rounded corner is at the top-right of the screen. |
Public methods |
|
|---|---|
boolean |
|
@NonNull Point |
Returns the circle center of a quarter circle approximation of this |
int |
Returns the x-coordinate of the circle center of a quarter circle approximation of this |
int |
Returns the y-coordinate of the circle center of a quarter circle approximation of this |
int |
Get the position of this |
int |
Returns the radius of a quarter circle approximation of this |
int |
hashCode() |
@NonNull String |
toString() |
Constants
POSITION_BOTTOM_LEFT
public static final int POSITION_BOTTOM_LEFT = 3
The rounded corner is at the bottom-left of the screen.
POSITION_BOTTOM_RIGHT
public static final int POSITION_BOTTOM_RIGHT = 2
The rounded corner is at the bottom-right of the screen.
POSITION_TOP_LEFT
public static final int POSITION_TOP_LEFT = 0
The rounded corner is at the top-left of the screen.
POSITION_TOP_RIGHT
public static final int POSITION_TOP_RIGHT = 1
The rounded corner is at the top-right of the screen.
Public methods
getCenter
public @NonNull Point getCenter()
Returns the circle center of a quarter circle approximation of this RoundedCornerCompat.
| Returns | |
|---|---|
@NonNull Point |
the center point of this |
getCenterX
public int getCenterX()
Returns the x-coordinate of the circle center of a quarter circle approximation of this RoundedCornerCompat.
| Returns | |
|---|---|
int |
the x-coordinate of the circle center. |
getCenterY
public int getCenterY()
Returns the y-coordinate of the circle center of a quarter circle approximation of this RoundedCornerCompat.
| Returns | |
|---|---|
int |
the y-coordinate of the circle center. |
getRadius
public int getRadius()
Returns the radius of a quarter circle approximation of this RoundedCornerCompat.
| Returns | |
|---|---|
int |
the rounded corner radius of this |