Class BorderStyle

  • BorderStyle is a class representing a complete border style for widgets.

  • BorderStyle enums are accessed through the parent class, name, and property.

  • The BorderStyle class includes methods to set the corner radius, stroke color, and type of the border.

BorderStyle

A class that represents a complete border style that can be applied to widgets.

To call an enum, you call its parent class, name, and property. For example,CardService.BorderStyle.NO_BORDER.

Methods

MethodReturn typeBrief description
setCornerRadius(radius)BorderStyleSets the corner radius of the border, for example 8.
setStrokeColor(color)BorderStyleSets the color of the border.
setType(type)BorderStyleSets the type of the border.

Detailed documentation

setCornerRadius(radius)

Sets the corner radius of the border, for example 8.

Parameters

NameTypeDescription
radiusIntegerThe corner radius to be applied to the border.

Return

BorderStyle — This object, for chaining.


setStrokeColor(color)

Sets the color of the border.

Parameters

NameTypeDescription
colorStringThe color in #RGB format to be applied to the border.

Return

BorderStyle — This object, for chaining.


setType(type)

Sets the type of the border.

Parameters

NameTypeDescription
typeBorderTypeThe border type.

Return

BorderStyle — This object, for chaining.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-03 UTC.