All Products
Search
Document Center

SuperApp:MiniAppCapsuleButtonStyle (for uni-app)

Last Updated:Oct 25, 2024

The configuration class for capsule button styles. This API is applicable only to uni-app miniapps.

public class MiniAppCapsuleButtonStyle

setBackgroundColor

public void setBackgroundColor(String color)

Sets the background color of a capsule button.

Parameters

color

String: the background color of the capsule button. Valid values: strings in the #RRGGBB or rgba(R,G,B,A) format. Default value: #FFFFFF .

setTextColor

public void setTextColor(String color)

Sets the text color of a capsule button.

Parameters

color

String: the text color of the capsule button. Valid values: strings in the #RRGGBB or rgba(R,G,B,A) format. Default value: #000000.

setHighlightColor

public void setHighlightColor(String color)

Sets the background color that you want to display when a capsule button is tapped.

Parameters

color

String: the background color that you want to display when the capsule button is tapped. Valid values: strings in the #RRGGBB or rgba(R,G,B,A) format. Default value: #CBCCCD.

setBorderColor

public void setBorderColor(String color)

Sets the border color of a capsule button.

Parameters

color

String: the border color of the capsule button. Valid values: strings in the #RRGGBB or rgba(R,G,B,A) format. Default value: #FFE5E5E5.