DisplayShapeCompat
class DisplayShapeCompat
Compatibility class for representing the physical shape of a display.
This class can be used to obtain a Path representing the display's shape, which can be useful for drawing or layout purposes, especially on devices with non-rectangular displays (e.g., circular or displays with rounded corners).
Instances of DisplayShapeCompat can be created in a few ways:
- Using create to parse an SVG path data string. This is suitable for custom or complex display shapes.
- Using create to define a common shape, such as a circle or a rectangle with specified corner radii.
Functions
Link copied to clipboard
@NonNull
Creates a DisplayShapeCompat from an SVG path specification string.
@NonNull
Creates a DisplayShapeCompat representing a rectangle with potentially rounded corners or a circular shape.