my.setBackgroundColor
This API is supported in mPaaS 10.1.32 and later versions.
Dynamically set window background color.
Input parameters
Attribute | Type | Required | Description |
---|---|---|---|
backgroundColor | HexColor | Yes | Background color of the window. |
backgroundColorTop | HexColor | Yes | Background color of the window top, only supported in iOS. |
backgroundColorBottom | HexColor | Yes | Background color of the window bottom, only supported in iOS. |
success | Function | No | Callback function for successful call. |
fail | Function | No | Callback function for failed call. |
complete | Function | No | Callback function for ended call (executed regardless of whether the call is successful or failed). |
Code sample
/*Set window background color*/
my.setBackgroundColor({
backgroundColor: '#ffffff'
})
/*Set background color of window top and bottom respectively*/
my.setBackgroundColor({
backgroundColorTop: '#ffffff',
backgroundColorBottom: '#ffffff'
})
my.setBackgroundTextStyle
This API is supported in mPaaS 10.1.32 and later versions.
Dynamically set the font of the pull-down background and the style of loading graphics.
Input parameters
Attribute | Type | Required | Description |
---|---|---|---|
textStyle | String | Yes | The font of the pull-down background and the style of loading graphics. Only dark and light are supported. |
success | Function | No | Callback function for successful call. |
fail | Function | No | Callback function for failed call. |
complete | Function | No | Callback function for ended call (executed regardless of whether the call is successful or failed). |
Code sample
my.setBackgroundTextStyle({
textStyle: 'dark', // Font of the pull-down background and the style of loading graphics are dark.
})