harmony 鸿蒙InnerFullScreenLaunchComponent (System API)
InnerFullScreenLaunchComponent (System API)
InnerFullScreenLaunchComponent is a component that allows the invoker to choose the timing for launching an atomic service. If the invoked application (the one being launched) grants the invoker the authorization to run the atomic service in an embedded manner, the invoker can operate the atomic service in full-screen embedded mode. If authorization is not provided, the invoker will launch the atomic service in a pop-up manner.
NOTE
This component is supported since API version 12. Updates will be marked with a superscript to indicate their earliest API version.
To implement an embeddable atomic service within this component, it must inherit from EmbeddableUIAbility. If it does not inherit from EmbeddableUIAbility, the system cannot guarantee that the atomic service will function properly.
Modules to Import
import { InnerFullScreenLaunchComponent, LauncherController } from '@kit.ArkUI'
Child Components
Not supported
Attributes
The universal attributes are not supported.
InnerFullScreenLaunchComponent
InnerFullScreenLaunchComponent({ content: Callback<void>, controller: LaunchController })
Decorator: \@Component
System API: This is a system API.
System capability: SystemCapability.ArkUI.ArkUI.Full
Parameters
Name | Type | Mandatory | Decorator Type | Description |
---|---|---|---|---|
content | Callback<void> | Yes | \@BuilderParam | Content displayed in the component. |
controller | LaunchController | Yes | - | Controller for launching the atomic service. |
LaunchController
System API: This is a system API.
System capability: SystemCapability.ArkUI.ArkUI.Full
Name | Type | Description |
---|---|---|
launchAtomicService | LaunchAtomicServiceCallback | Launches an atomic service. |
LaunchAtomicServiceCallback
System API: This is a system API.
System capability: SystemCapability.ArkUI.ArkUI.Full
Name | Type | Mandatory | Description |
---|---|---|---|
appId | string | Yes | Application ID for the atomic service. |
options | AtomicServiceOptions | No | Parameters for launching the atomic service. |
Events
The universal events are not supported.
Example
import { InnerFullScreenLaunchComponent, LaunchController } from '@kit.ArkUI';
@Entry
@Component
struct Index {
appId1: string = '5765880207853275505';
appId2: string = '5765880207854372375';
@Builder
ColumChild() {
Column() {
Text('InnerFullScreenLaunchComponent').fontSize(16).margin({top: 100})
Button('Start Sunrise/Sunset'')
.onClick(()=>{
let appId2: string = '5765880207854372375';
this.controller.launchAtomicService(appId2, {})
}).height(30).width('50%').margin({top: 50})
Button('Start Recharge')
.onClick(()=>{
let appId2: string = '5765880207853275489';
this.controller.launchAtomicService(appId2, {})
}).height(30).width('50%').margin({top: 50})
}.backgroundColor(Color.Pink).height('100%').width('100%')
}
controller: LaunchController = new LaunchController();
build() {
Column() {
InnerFullScreenLaunchComponent({
content: this.ColumChild,
controller: this.controller,
})
}
.width('100%').height('100%')
}
}
你可能感兴趣的鸿蒙文章
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦