@react-native-oh-tpl/react-native-gesture-handler 2.12.9 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DrawerLayout/index.ts +2 -0
- package/Swipeable/index.ts +2 -0
- package/harmony/gesture_handler.har +0 -0
- package/lib/commonjs/RNGestureHandlerModule.js +2 -3
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +3 -3
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +15 -18
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/index.js +94 -137
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -2
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -3
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -3
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/handlers/createHandler.js +12 -15
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/index.js +10 -141
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -2
- package/lib/typescript/components/GestureHandlerRootView.d.ts +6 -6
- package/lib/typescript/handlers/createHandler.d.ts +11 -11
- package/lib/typescript/index.d.ts +42 -9
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +14 -14
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -6
- package/package.json +74 -66
- package/src/RNGestureHandlerModule.ts +4 -4
- package/src/components/GestureHandlerRootView.tsx +23 -23
- package/src/handlers/createHandler.tsx +534 -534
- package/src/index.ts +172 -172
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -26
- package/src/specs/RNGestureHandlerButtonNativeComponent.ts +18 -18
- package/src/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -6
- package/harmony/gesture_handler/BuildProfile.ets +0 -5
- package/harmony/gesture_handler/build-profile.json5 +0 -19
- package/harmony/gesture_handler/hvigorfile.ts +0 -2
- package/harmony/gesture_handler/index.ets +0 -3
- package/harmony/gesture_handler/oh-package-lock.json5 +0 -17
- package/harmony/gesture_handler/oh-package.json5 +0 -12
- package/harmony/gesture_handler/src/main/cpp/CMakeLists.txt +0 -8
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.cpp +0 -103
- package/harmony/gesture_handler/src/main/cpp/GestureHandlerPackage.h +0 -21
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentDescriptor.h +0 -36
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonComponentInstance.h +0 -27
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerButtonJSIBinder.h +0 -32
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.cpp +0 -22
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerModule.h +0 -15
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerPackage.h +0 -72
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentDescriptor.h +0 -36
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewComponentInstance.h +0 -78
- package/harmony/gesture_handler/src/main/cpp/RNGestureHandlerRootViewJSIBinder.h +0 -25
- package/harmony/gesture_handler/src/main/ets/CircularBuffer.ts +0 -42
- package/harmony/gesture_handler/src/main/ets/Event.ts +0 -68
- package/harmony/gesture_handler/src/main/ets/EventDispatcher.ts +0 -53
- package/harmony/gesture_handler/src/main/ets/GestureHandler.ts +0 -663
- package/harmony/gesture_handler/src/main/ets/GestureHandlerArkUIAdapter.ts +0 -203
- package/harmony/gesture_handler/src/main/ets/GestureHandlerFactory.ts +0 -45
- package/harmony/gesture_handler/src/main/ets/GestureHandlerOrchestrator.ts +0 -280
- package/harmony/gesture_handler/src/main/ets/GestureHandlerPackage.ts +0 -22
- package/harmony/gesture_handler/src/main/ets/GestureHandlerRegistry.ts +0 -28
- package/harmony/gesture_handler/src/main/ets/InteractionManager.ts +0 -109
- package/harmony/gesture_handler/src/main/ets/LeastSquareSolver.ts +0 -182
- package/harmony/gesture_handler/src/main/ets/NativeViewGestureHandler.ts +0 -115
- package/harmony/gesture_handler/src/main/ets/OutgoingEvent.ts +0 -34
- package/harmony/gesture_handler/src/main/ets/PanGestureHandler.ts +0 -328
- package/harmony/gesture_handler/src/main/ets/PointerTracker.ts +0 -239
- package/harmony/gesture_handler/src/main/ets/RNGHError.ts +0 -5
- package/harmony/gesture_handler/src/main/ets/RNGHLogger.ts +0 -48
- package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerArkTS.ts +0 -60
- package/harmony/gesture_handler/src/main/ets/RNGHRootTouchHandlerCAPI.ts +0 -87
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerButton.ets +0 -38
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerModule.ts +0 -183
- package/harmony/gesture_handler/src/main/ets/RNGestureHandlerRootView.ets +0 -53
- package/harmony/gesture_handler/src/main/ets/RNOHScrollLocker.ts +0 -23
- package/harmony/gesture_handler/src/main/ets/State.ts +0 -47
- package/harmony/gesture_handler/src/main/ets/TapGestureHandler.ts +0 -206
- package/harmony/gesture_handler/src/main/ets/Vector2D.ts +0 -36
- package/harmony/gesture_handler/src/main/ets/VelocityTracker.ts +0 -98
- package/harmony/gesture_handler/src/main/ets/View.ts +0 -71
- package/harmony/gesture_handler/src/main/ets/ViewRegistry.ts +0 -43
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerButton.ts +0 -140
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerModule.ts +0 -25
- package/harmony/gesture_handler/src/main/ets/namespace/RNGestureHandlerRootView.ts +0 -101
- package/harmony/gesture_handler/src/main/ets/namespace/ts.ts +0 -3
- package/harmony/gesture_handler/src/main/ets/pages/Index.ets +0 -17
- package/harmony/gesture_handler/src/main/ets/types.ts +0 -25
- package/harmony/gesture_handler/src/main/ets/webviewability/WebviewAbility.ts +0 -41
- package/harmony/gesture_handler/src/main/module.json5 +0 -7
- package/harmony/gesture_handler/src/main/resources/base/element/color.json +0 -8
- package/harmony/gesture_handler/src/main/resources/base/element/string.json +0 -16
- package/harmony/gesture_handler/src/main/resources/base/media/icon.png +0 -0
- package/harmony/gesture_handler/src/main/resources/base/profile/main_pages.json +0 -5
- package/harmony/gesture_handler/src/main/resources/en_US/element/string.json +0 -16
- package/harmony/gesture_handler/src/main/resources/zh_CN/element/string.json +0 -16
- package/harmony/gesture_handler/ts.ts +0 -2
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
// This file was generated.
|
|
2
|
-
import {
|
|
3
|
-
Descriptor as ComponentDescriptor,
|
|
4
|
-
ViewBaseProps,
|
|
5
|
-
ViewRawProps,
|
|
6
|
-
ViewDescriptorWrapperBase,
|
|
7
|
-
ColorValue,
|
|
8
|
-
Color,
|
|
9
|
-
RNInstance,
|
|
10
|
-
Tag,
|
|
11
|
-
RNComponentCommandReceiver,
|
|
12
|
-
ViewPropsSelector,
|
|
13
|
-
} from '@rnoh/react-native-openharmony/ts';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export namespace RNGestureHandlerButton {
|
|
17
|
-
export const NAME = "RNGestureHandlerButton" as const
|
|
18
|
-
|
|
19
|
-
export interface DirectRawProps {
|
|
20
|
-
exclusive?: boolean;
|
|
21
|
-
foreground?: boolean;
|
|
22
|
-
borderless?: boolean;
|
|
23
|
-
enabled?: boolean;
|
|
24
|
-
rippleColor?: ColorValue;
|
|
25
|
-
rippleRadius?: number;
|
|
26
|
-
touchSoundDisabled?: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface Props extends ViewBaseProps {}
|
|
30
|
-
|
|
31
|
-
export interface State {}
|
|
32
|
-
|
|
33
|
-
export interface RawProps extends ViewRawProps, DirectRawProps {}
|
|
34
|
-
|
|
35
|
-
export class PropsSelector extends ViewPropsSelector<Props, RawProps> {
|
|
36
|
-
get exclusive() {
|
|
37
|
-
return this.rawProps.exclusive ?? true;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
get foreground() {
|
|
41
|
-
return this.rawProps.foreground ?? false;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
get borderless() {
|
|
45
|
-
return this.rawProps.borderless ?? false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
get enabled() {
|
|
49
|
-
return this.rawProps.enabled ?? true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get rippleRadius() {
|
|
53
|
-
return this.rawProps.rippleRadius ?? 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
get touchSoundDisabled() {
|
|
57
|
-
return this.rawProps.touchSoundDisabled ?? false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
get rippleColor() {
|
|
62
|
-
if (this.rawProps.rippleColor) {
|
|
63
|
-
return Color.fromColorValue(this.rawProps.rippleColor)
|
|
64
|
-
} else {
|
|
65
|
-
return new Color({ r: 0, g: 0, b: 0, a: 255})
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export type Descriptor = ComponentDescriptor<
|
|
72
|
-
typeof NAME,
|
|
73
|
-
Props,
|
|
74
|
-
State,
|
|
75
|
-
RawProps
|
|
76
|
-
>;
|
|
77
|
-
|
|
78
|
-
export class DescriptorWrapper extends ViewDescriptorWrapperBase<
|
|
79
|
-
typeof NAME,
|
|
80
|
-
Props,
|
|
81
|
-
State,
|
|
82
|
-
RawProps,
|
|
83
|
-
PropsSelector
|
|
84
|
-
> {
|
|
85
|
-
protected createPropsSelector() {
|
|
86
|
-
return new PropsSelector(this.descriptor.props, this.descriptor.rawProps)
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface EventPayloadByName {
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export class EventEmitter {
|
|
94
|
-
constructor(private rnInstance: RNInstance, private tag: Tag) {}
|
|
95
|
-
|
|
96
|
-
emit<TEventName extends keyof EventPayloadByName>(eventName: TEventName, payload: EventPayloadByName[TEventName]) {
|
|
97
|
-
this.rnInstance.emitComponentEvent(this.tag, eventName, payload)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface CommandArgvByName {
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export class CommandReceiver {
|
|
105
|
-
private listenersByCommandName = new Map<string, Set<(...args: any[]) => void>>()
|
|
106
|
-
private cleanUp: (() => void) | undefined = undefined
|
|
107
|
-
|
|
108
|
-
constructor(private componentCommandReceiver: RNComponentCommandReceiver, private tag: Tag) {
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
subscribe<TCommandName extends keyof CommandArgvByName>(commandName: TCommandName, listener: (argv: CommandArgvByName[TCommandName]) => void) {
|
|
112
|
-
if (!this.listenersByCommandName.has(commandName)) {
|
|
113
|
-
this.listenersByCommandName.set(commandName, new Set())
|
|
114
|
-
}
|
|
115
|
-
this.listenersByCommandName.get(commandName)!.add(listener)
|
|
116
|
-
const hasRegisteredCommandReceiver = !!this.cleanUp
|
|
117
|
-
if (!hasRegisteredCommandReceiver) {
|
|
118
|
-
this.cleanUp = this.componentCommandReceiver.registerCommandCallback(this.tag, (commandName: string, argv: any[]) => {
|
|
119
|
-
if (this.listenersByCommandName.has(commandName)) {
|
|
120
|
-
const listeners = this.listenersByCommandName.get(commandName)!
|
|
121
|
-
listeners.forEach(listener => {
|
|
122
|
-
listener(argv)
|
|
123
|
-
})
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return () => {
|
|
129
|
-
this.listenersByCommandName.get(commandName)?.delete(listener)
|
|
130
|
-
if (this.listenersByCommandName.get(commandName)?.size ?? 0 === 0) {
|
|
131
|
-
this.listenersByCommandName.delete(commandName)
|
|
132
|
-
}
|
|
133
|
-
if (this.listenersByCommandName.size === 0) {
|
|
134
|
-
this.cleanUp?.()
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// This file was generated.
|
|
2
|
-
import { Tag } from "../../ts"
|
|
3
|
-
|
|
4
|
-
export namespace RNGestureHandlerModule {
|
|
5
|
-
export const NAME = 'RNGestureHandlerModule' as const
|
|
6
|
-
|
|
7
|
-
export interface Spec {
|
|
8
|
-
handleSetJSResponder(tag: number, blockNativeResponder: boolean): void;
|
|
9
|
-
|
|
10
|
-
handleClearJSResponder(): void;
|
|
11
|
-
|
|
12
|
-
createGestureHandler(handlerName: string, handlerTag: number, config: Object): void;
|
|
13
|
-
|
|
14
|
-
attachGestureHandler(handlerTag: number, newView: number, actionType: number): void;
|
|
15
|
-
|
|
16
|
-
updateGestureHandler(handlerTag: number, newConfig: Object): void;
|
|
17
|
-
|
|
18
|
-
dropGestureHandler(handlerTag: number): void;
|
|
19
|
-
|
|
20
|
-
install(): boolean;
|
|
21
|
-
|
|
22
|
-
flushOperations(): void;
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
// This file was generated.
|
|
2
|
-
import {
|
|
3
|
-
Descriptor as ComponentDescriptor,
|
|
4
|
-
ViewBaseProps,
|
|
5
|
-
ViewRawProps,
|
|
6
|
-
ViewDescriptorWrapperBase,
|
|
7
|
-
ColorValue,
|
|
8
|
-
Color,
|
|
9
|
-
RNInstance,
|
|
10
|
-
Tag,
|
|
11
|
-
RNComponentCommandReceiver,
|
|
12
|
-
ViewPropsSelector,
|
|
13
|
-
} from '@rnoh/react-native-openharmony/ts';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export namespace RNGestureHandlerRootView {
|
|
17
|
-
export const NAME = "RNGestureHandlerRootView" as const
|
|
18
|
-
|
|
19
|
-
export interface DirectRawProps {
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface Props extends ViewBaseProps {}
|
|
23
|
-
|
|
24
|
-
export interface State {}
|
|
25
|
-
|
|
26
|
-
export interface RawProps extends ViewRawProps, DirectRawProps {}
|
|
27
|
-
|
|
28
|
-
export class PropsSelector extends ViewPropsSelector<Props, RawProps> {
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type Descriptor = ComponentDescriptor<
|
|
33
|
-
typeof NAME,
|
|
34
|
-
Props,
|
|
35
|
-
State,
|
|
36
|
-
RawProps
|
|
37
|
-
>;
|
|
38
|
-
|
|
39
|
-
export class DescriptorWrapper extends ViewDescriptorWrapperBase<
|
|
40
|
-
typeof NAME,
|
|
41
|
-
Props,
|
|
42
|
-
State,
|
|
43
|
-
RawProps,
|
|
44
|
-
PropsSelector
|
|
45
|
-
> {
|
|
46
|
-
protected createPropsSelector() {
|
|
47
|
-
return new PropsSelector(this.descriptor.props, this.descriptor.rawProps)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface EventPayloadByName {
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export class EventEmitter {
|
|
55
|
-
constructor(private rnInstance: RNInstance, private tag: Tag) {}
|
|
56
|
-
|
|
57
|
-
emit<TEventName extends keyof EventPayloadByName>(eventName: TEventName, payload: EventPayloadByName[TEventName]) {
|
|
58
|
-
this.rnInstance.emitComponentEvent(this.tag, eventName, payload)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface CommandArgvByName {
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class CommandReceiver {
|
|
66
|
-
private listenersByCommandName = new Map<string, Set<(...args: any[]) => void>>()
|
|
67
|
-
private cleanUp: (() => void) | undefined = undefined
|
|
68
|
-
|
|
69
|
-
constructor(private componentCommandReceiver: RNComponentCommandReceiver, private tag: Tag) {
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
subscribe<TCommandName extends keyof CommandArgvByName>(commandName: TCommandName, listener: (argv: CommandArgvByName[TCommandName]) => void) {
|
|
73
|
-
if (!this.listenersByCommandName.has(commandName)) {
|
|
74
|
-
this.listenersByCommandName.set(commandName, new Set())
|
|
75
|
-
}
|
|
76
|
-
this.listenersByCommandName.get(commandName)!.add(listener)
|
|
77
|
-
const hasRegisteredCommandReceiver = !!this.cleanUp
|
|
78
|
-
if (!hasRegisteredCommandReceiver) {
|
|
79
|
-
this.cleanUp = this.componentCommandReceiver.registerCommandCallback(this.tag, (commandName: string, argv: any[]) => {
|
|
80
|
-
if (this.listenersByCommandName.has(commandName)) {
|
|
81
|
-
const listeners = this.listenersByCommandName.get(commandName)!
|
|
82
|
-
listeners.forEach(listener => {
|
|
83
|
-
listener(argv)
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return () => {
|
|
90
|
-
this.listenersByCommandName.get(commandName)?.delete(listener)
|
|
91
|
-
if (this.listenersByCommandName.get(commandName)?.size ?? 0 === 0) {
|
|
92
|
-
this.listenersByCommandName.delete(commandName)
|
|
93
|
-
}
|
|
94
|
-
if (this.listenersByCommandName.size === 0) {
|
|
95
|
-
this.cleanUp?.()
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export enum TouchType {
|
|
2
|
-
Down,
|
|
3
|
-
Up,
|
|
4
|
-
Move,
|
|
5
|
-
Cancel
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface BaseEvent {
|
|
9
|
-
timestamp: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface TouchObject {
|
|
13
|
-
type: TouchType;
|
|
14
|
-
id: number;
|
|
15
|
-
windowX: number;
|
|
16
|
-
windowY: number;
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface TouchEvent extends BaseEvent {
|
|
22
|
-
type: TouchType;
|
|
23
|
-
touches: TouchObject[];
|
|
24
|
-
changedTouches: TouchObject[];
|
|
25
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import UIAbility from '@ohos.app.ability.UIAbility';
|
|
2
|
-
import hilog from '@ohos.hilog';
|
|
3
|
-
import window from '@ohos.window';
|
|
4
|
-
|
|
5
|
-
export default class WebviewAbility extends UIAbility {
|
|
6
|
-
onCreate(want, launchParam) {
|
|
7
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
onDestroy() {
|
|
11
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
onWindowStageCreate(windowStage: window.WindowStage) {
|
|
15
|
-
// Main window is created, set main page for this ability
|
|
16
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate');
|
|
17
|
-
|
|
18
|
-
windowStage.loadContent('pages/Index', (err, data) => {
|
|
19
|
-
if (err.code) {
|
|
20
|
-
hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? '');
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
hilog.info(0x0000, 'testTag', 'Succeeded in loading the content. Data: %{public}s', JSON.stringify(data) ?? '');
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
onWindowStageDestroy() {
|
|
28
|
-
// Main window is destroyed, release UI related resources
|
|
29
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
onForeground() {
|
|
33
|
-
// Ability has brought to foreground
|
|
34
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
onBackground() {
|
|
38
|
-
// Ability has back to background
|
|
39
|
-
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground');
|
|
40
|
-
}
|
|
41
|
-
}
|
|
Binary file
|