1 Star 0 Fork 5.4K

OpenHarmony_EU incubator / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ohos-abilityslice.md 10.40 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

OHOS::AbilitySlice

Overview

Related Modules:

AbilityKit

Description:

Provides ability slice-related functions, including ability slice lifecycle callbacks and functions for connecting to or disconnecting from ability slices.

AbilitySlice instances, which are specific to Feature Abilities (abilities using the Page template), are used to present different screens on an application's user interface. A Feature Ability can have multiple ability slices.

Since:

1.0

Version:

1.0

Summary

Public Member Functions

Public Member Function Name

Description

OnStart (const Want &want)

virtual void

Called when this ability slice is started. You must override this function if you want to perform some initialization operations during ability slice startup.

OnInactive ()

virtual void

Called when this ability slice enters the STATE_INACTIVE state.

OnActive (const Want &want)

virtual void

Called when this ability slice enters the STATE_ACTIVE state.

OnBackground ()

virtual void

Called when this ability slice enters the STATE_BACKGROUND state.

OnStop ()

virtual void

Called when this ability slice enters the STATE_STOP state.

Present (AbilitySlice &abilitySlice, const Want &want)

void

Presents another ability slice, which can be an ability slice that is not started or an existing ability slice in the host ability.

Terminate ()

void

Destroys this ability slice.

SetUIContent (RootView *rootView)

void

Sets the UI layout for the host ability of this ability slice.

StartAbility (const Want &want)

int

Starts an Ability based on the specified Want information.

StopAbility (const Want &want)

int

Stops an Ability based on the specified Want information.

TerminateAbility ()

int

Destroys this Ability.

ConnectAbility (const Want &want, const IAbilityConnection &conn, void *data)

int

Connects to a Service ability based on the specified Want information.

DisconnectAbility (const IAbilityConnection &conn)

int

Disconnects from a Service ability.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open-harmony-eu-incubator/docs.git
git@gitee.com:open-harmony-eu-incubator/docs.git
open-harmony-eu-incubator
docs
docs
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891