Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
This capability is applicable only when the current device and its screen state support the multitask view. Currently, the following device types support the multitask view:
Bi-fold phones in unfolded state
Tri-fold phones in Dual screen mode or Triple screen mode (in landscape mode)
Tablets in landscape mode
For other device types or states, this component will not respond to any taps on the in-app multi-window icon.
The MultiWindowEntryInAPP component is responsible for implementing the logic for simultaneously running a single app in multiple windows. You can leverage this component to develop this feature for your app based on your service needs.
Device behavior differences: This component is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
MultiWindowEntryInAPPAttribute is essential for configuring the HdsListItemCard component. In version 6.0.1(21) and earlier, you must manually import MultiWindowEntryInAPPAttribute after importing the MultiWindowEntryInAPP component. Otherwise, a compilation error is reported. However, starting from version 6.0.2(22), the compilation toolchain automatically imports MultiWindowEntryInAPPAttribute when it detects the MultiWindowEntryInAPP component, so manual import is no longer necessary.
If you manually import HdsListItemCardAttribute, DevEco Studio shows it as disabled (grayed out). In version 6.0.1(21) and earlier, removing this import causes a compilation error. But from version 6.0.2(22) onward, removing it does not affect the functionality.
Version 6.0.1(21) and earlier:
import { MultiWindowEntryInAPP, MultiWindowEntryInAPPParams, MultiWindowEntryInAPPIconOptions, MultiWindowEntryInAPPSubtitleOptions, MultiWindowEntryInAPPAttribute } from '@kit.UIDesignKit'; Version 6.0.2(22) and later:
import { MultiWindowEntryInAPP, MultiWindowEntryInAPPParams, MultiWindowEntryInAPPIconOptions, MultiWindowEntryInAPPSubtitleOptions } from '@kit.UIDesignKit'; None
MultiWindowEntryInAPP(params: MultiWindowEntryInAPPParams)
Creates the in-app multi-window component.
System capability: SystemCapability.UIDesign.HDSComponent.Core
Device behavior differences: This API is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| params | MultiWindowEntryInAPPParams | Yes | In-app multi-window component parameters. |
Parameters of the MultiWindowEntryInAPP component.
System capability: SystemCapability.UIDesign.HDSComponent.Core
Device behavior differences: This API is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
Parameters:
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| want | Want | No | No | Parameters for starting multiple windows. The requirements are as follows: 1. The abilityName, moduleName, and bundleName fields are mandatory. 2. App restrictions: All the specified fields (including abilityName, moduleName, and bundleName) must belong to the current app. 3. Cross-app restrictions: The multi-windows function does not support cross-app capabilities. |
| isShowSubtitle | boolean | No | Yes | Indicates whether to display the component text title. true: yes false: no The default value is false. |
| multiWindowEntryInAPPStyle | MultiWindowEntryInAPPStyle | No | Yes | Component style parameters. |
Defines the style parameters for the MultiWindowEntryInAPP component.
System capability: SystemCapability.UIDesign.HDSComponent.Core
Device behavior differences: This API is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
Parameters:
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| iconOptions | MultiWindowEntryInAPPIconOptions | No | Yes | Component icon parameters. |
| subtitleOptions | MultiWindowEntryInAPPSubtitleOptions | No | Yes | Component text title parameters. |
Defines the icon parameters for the MultiWindowEntryInAPP component.
System capability: SystemCapability.UIDesign.HDSComponent.Core
Device behavior differences: This API is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
Parameters:
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| iconColor | ResourceColor | No | Yes | Component icon color. Default value: $r('sys.color.font_primary') |
| iconWeight | number | FontWeight | string | No | Yes | Component icon font weight. The default value is 400. NOTE: - For the number type, the value ranges from 100 to 900, at an interval of 100. The default value is 400. A larger value indicates a larger font weight. - For the string type, only strings that represent a number, for example, 400, and the following enumerated values of FontWeight are supported: Bold, Bolder, Lighter, Regular, and Medium. |
| iconSize | number | string | Resource | No | Yes | Component icon size. Default value: 24 x 24 vp NOTE: Percentages are not supported currently. |
| backgroundColor | ResourceColor | No | Yes | Background color of the component. Default value: $r('sys.color.comp_background_tertiary') |
Defines the title text parameter of the MultiWindowEntryInAPP component.
System capability: SystemCapability.UIDesign.HDSComponent.Core
Device behavior differences: This API is supported only for phones and tablets in specific forms and does not apply for other devices.
Start version: 6.0.0(20)
Parameters:
| Name | Type | Read-Only | Optional | Description |
|---|---|---|---|---|
| modifier | TextModifier | No | Yes | Component text title modifier. |
Universal attributes are supported.
The width, height, and size attributes do not support percentages currently.
This component does not support the accessibilityDescription and accessibilityText attributes.
Most universal attributes are supported.
This component does not support the onClick event. If you want to listen for tap events, use the onTouch event instead.
An app can integrate the in-app multi-window component, allowing users to tap the split-screen button for multiple UIAbility components to be displayed in split-screen mode or enter Multitask view mode.
// Starting from version 6.0.2(22), you do not need to manually import MultiWindowEntryInAPPAttribute. For details, refer to the "Modules to Import" section of the MultiWindowEntryInAPP reference document.
import { MultiWindowEntryInAPP, MultiWindowEntryInAPPAttribute } from '@kit.UIDesignKit';
import { Want } from '@kit.AbilityKit';
import { TextModifier } from '@kit.ArkUI';
@Entry
@Component
struct MultiWindowEntryInAPPTest {
@State textModifier: TextModifier = new TextModifier();
private want: Want = {
// Replace the values of bundleName, moduleName, and abilityName with those of your app to start the UIAbility in the app.
bundleName: "com.example.myapplication",
moduleName: "entry",
abilityName: "FuncAbility",
};
build() {
Row() {
MultiWindowEntryInAPP({
want: this.want, isShowSubtitle: true, multiWindowEntryInAPPStyle: {
iconOptions: {
iconSize: 24,
iconColor: $r('sys.color.font_primary'),
iconWeight: FontWeight.Normal,
backgroundColor: $r('sys.color.comp_background_tertiary')
},
subtitleOptions: {
modifier: this.textModifier.fontColor(Color.Black)
}
}
})
.size({ width: 48, height: 48 })
.position({ x: 400, y: 30 })
}
}
} 