{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CornerSize

public interface CornerSize


Defines size of a corner in pixels. For example for rounded shape it can be a corner radius.

Summary

Public methods

abstract float
toPx(@NonNull Size shapeSize, @NonNull Density density)

Converts the CornerSize to pixels.

Public methods

toPx

abstract float toPx(@NonNull Size shapeSize, @NonNull Density density)

Converts the CornerSize to pixels.

Parameters
@NonNull Size shapeSize

the size of the shape

@NonNull Density density

the current density of the screen.

Returns
float

resolved size of the corner in pixels