setTransparentTtitle

The setTransparentTitle function is used to configure the title bar background mode (e.g. transparent or opaque mode) .

Method signature

copy
setTransparentTitle(@NonNull transparentTitle: GRVStartupParams.TransparentTitle): GRVStartupParams.Builder

Parameters

Parameter

Data Type

Default value

Required

Description

transparentTitle

GRVStartupParams.TransparentTitle

GRVStartupParams.TransparentTitle.NONE

Yes

This parameter is used to configure the the background mode of the title bar.

Valid values:

  • ALWAYS: indicates the background is always transparent.
  • AUTO: indicates the background transparency follows the sliding distance.
  • NONE: indicates the background is always opaque (Default).

Sample

copy
val startupParams = GRVStartupParams.createBuilderForApp(context, appId)
    .setTransparentTitle(GRVStartupParams.TransparentTitle.AUTO)
    .build()
Griver.openApp(startupParams,null)

User experience

Value

Screenshot

(Before sliding)

Screenshot

(After sliding)

ALWAYS

image.png

The background is always transparent.

image.png

AUTO

The background transparency follows the sliding distance.

image.png

NONE

The background is always opaque.

image.png