setTitleColor

The setTitleColor function is used to specify the text color of the page title.

Method signature

copy
setTitleColor(@IntRange(from = 0,to = 255) red: Int,
              @IntRange(from = 0,to = 255) green: Int,
              @IntRange(from = 0,to = 255) blue: Int,
              @IntRange(from = 0,to = 255) alpha: Int):GRVStartupParams.Builder

Parameters

The following parameters specify the text color of page title.

Parameter

Data Type

Default value

Required

Description

red

Int

0

Yes

Specifies the value of the red channel. The value range is between 0-255, including 0 and 255.

green

Int

0

Yes

Specifies the value of the green channel. The value range is between 0-255, including 0 and 255.

blue

Int

0

Yes

Specifies the value of the blue channel. The value range is between 0-255, including 0 and 255.

alpha

Int

255

Yes

Specifies the value of the alpha channel.

The value range is between 0-255, including 0 and 255.

Note: Currently, this parameter does not support passing in customized values. If a value other than 255 is set, it is still set to 255.

Sample

copy
val startupParams = GRVStartupParams.createBuilderForApp(context, appId)
    .setTitleColor(0,0,0,255)
    .build()
Griver.openApp(startupParams,null)

User experience

Value

Screenshot

(255,0,0,255)

image.png