setScreenOrientation
The setScreenOrientation function is used to configure the initial screen orientation of a mini program when it is first launched.
Method signature
copy
setScreenOrientation(@NonNull screenOrientation: GRVStartupParams.ScreenOrientation): GRVStartupParams.Builder
Parameters
Parameter | Data Type | Default value | Required | Description |
screenOrientation | GRVStartupParams.ScreenOrientation | GRVStartupParams.ScreenOrientation.PORTRAIT | Yes | This parameter is used to configure the initial screen orientation of a mini program when it is first launched. Valid values:
If this parameter is not specified, the inital screen orientation is |
Sample
copy
val startupParams = GRVStartupParams.createBuilderForApp(context, appId)
.setScreenOrientation(GRVStartupParams.ScreenOrientation.LANDSCAPE)
.build()
Griver.openApp(startupParams,null)
User experience
Value | Screenshot |
| |
|