@compass-framework/core 1.2.59 → 1.2.61
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/@types/activity/Activity.d.ts +24 -0
- package/@types/activity/ActivityType.ts +3 -0
- package/@types/activity/ExtraValue.d.ts +1 -0
- package/@types/activity/Intent.ts +14 -0
- package/@types/{AlphaAnimation.d.ts → animation/AlphaAnimation.d.ts} +1 -1
- package/@types/{Animation.d.ts → animation/Animation.d.ts} +3 -3
- package/@types/{AnimationSet.d.ts → animation/AnimationSet.d.ts} +1 -1
- package/@types/{Interpolator.d.ts → animation/Interpolator.d.ts} +1 -1
- package/@types/{LayoutAnimationController.d.ts → animation/LayoutAnimationController.d.ts} +3 -3
- package/@types/{RotateAnimation.d.ts → animation/RotateAnimation.d.ts} +1 -1
- package/@types/{ScaleAnimation.d.ts → animation/ScaleAnimation.d.ts} +1 -1
- package/@types/{Transformation.d.ts → animation/Transformation.d.ts} +2 -2
- package/@types/{TranslateAnimation.d.ts → animation/TranslateAnimation.d.ts} +1 -1
- package/@types/{Animator.d.ts → animator/Animator.d.ts} +1 -1
- package/@types/{ValueAnimator.d.ts → animator/ValueAnimator.d.ts} +1 -1
- package/@types/app/Application.d.ts +11 -0
- package/@types/app/ApplicationConfig.d.ts +5 -0
- package/@types/app/ApplicationCreator.d.ts +9 -0
- package/@types/app/ApplicationCreatorConfig.d.ts +10 -0
- package/@types/{Canvas.d.ts → canvas/Canvas.d.ts} +1 -1
- package/@types/{Color.d.ts → canvas/Color.d.ts} +2 -2
- package/@types/{CornerPathEffect.d.ts → canvas/CornerPathEffect.d.ts} +1 -1
- package/@types/{LinearGradient.d.ts → canvas/LinearGradient.d.ts} +1 -1
- package/@types/{Matrix.d.ts → canvas/Matrix.d.ts} +1 -1
- package/@types/canvas/Paint.d.ts +475 -0
- package/@types/{Path.d.ts → canvas/Path.d.ts} +1 -1
- package/@types/{Picture.d.ts → canvas/Picture.d.ts} +2 -2
- package/@types/{Rect.d.ts → canvas/Rect.d.ts} +1 -1
- package/@types/{Shadow.d.ts → canvas/Shadow.d.ts} +1 -1
- package/@types/{Surface.d.ts → canvas/Surface.d.ts} +2 -2
- package/@types/{TypefaceFactory.d.ts → canvas/TypefaceFactory.d.ts} +1 -1
- package/@types/{ArrayAdapter.d.ts → content/ArrayAdapter.d.ts} +2 -2
- package/@types/{AttributeSet.d.ts → content/AttributeSet.d.ts} +3 -3
- package/@types/{BaseAdapter.d.ts → content/BaseAdapter.d.ts} +3 -3
- package/@types/content/Context.d.ts +28 -0
- package/@types/content/ContextWrapper.d.ts +29 -0
- package/@types/{LayoutInflater.ts → content/LayoutInflater.ts} +2 -2
- package/@types/{Resources.d.ts → content/Resources.d.ts} +3 -6
- package/@types/{XMLViewFactoryRegistry.d.ts → content/ViewFactoryRegistry.d.ts} +10 -10
- package/@types/{MouseCursor.ts → display/MouseCursor.ts} +1 -1
- package/@types/{SurfaceProvider.d.ts → display/SurfaceProvider.d.ts} +2 -2
- package/@types/{ColorDrawable.d.ts → drawable/ColorDrawable.d.ts} +2 -2
- package/@types/{CornersDrawable.d.ts → drawable/CornersDrawable.d.ts} +2 -2
- package/@types/{Drawable.d.ts → drawable/Drawable.d.ts} +7 -7
- package/@types/{ImageDrawable.ts → drawable/ImageDrawable.ts} +3 -3
- package/@types/{LayerDrawable.d.ts → drawable/LayerDrawable.d.ts} +3 -3
- package/@types/{LinearGradientDrawable.d.ts → drawable/LinearGradientDrawable.d.ts} +1 -1
- package/@types/{PictureDrawable.d.ts → drawable/PictureDrawable.d.ts} +4 -4
- package/@types/{Resolver.ts → evaluate/Resolver.ts} +1 -1
- package/@types/host/CanvaskitPlatformHostConfig.d.ts +3 -0
- package/@types/host/NodePlatformHostConfig.d.ts +4 -0
- package/@types/host/WebPlatformHostConfig.d.ts +3 -0
- package/@types/imm/InputMethod.d.ts +3 -0
- package/@types/{AbsoluteLayout.d.ts → layout/AbsoluteLayout.d.ts} +1 -1
- package/@types/{FrameLayout.d.ts → layout/FrameLayout.d.ts} +1 -1
- package/@types/{GridLayout.d.ts → layout/GridLayout.d.ts} +1 -1
- package/@types/{GridLayoutAnimationController.d.ts → layout/GridLayoutAnimationController.d.ts} +1 -1
- package/@types/{LinearLayout.d.ts → layout/LinearLayout.d.ts} +1 -1
- package/@types/{RelativeLayout.d.ts → layout/RelativeLayout.d.ts} +1 -1
- package/@types/{TabBarLayout.d.ts → layout/TabBarLayout.d.ts} +1 -1
- package/@types/{TableLayout.d.ts → layout/TableLayout.d.ts} +1 -1
- package/@types/{TableRow.d.ts → layout/TableRow.d.ts} +1 -1
- package/@types/{DoubleClick.d.ts → misc/DoubleClick.d.ts} +2 -2
- package/@types/{DoubleClickListener.d.ts → misc/DoubleClickListener.d.ts} +2 -2
- package/@types/{ContextUtils.d.ts → shared/ContextUtils.d.ts} +1 -1
- package/@types/view/Gravity.d.ts +41 -0
- package/@types/{Outline.d.ts → view/Outline.d.ts} +2 -2
- package/@types/{View.d.ts → view/View.d.ts} +477 -15
- package/@types/{ViewGroup.d.ts → view/ViewGroup.d.ts} +4 -4
- package/@types/{ViewGroupOverlay.d.ts → view/ViewGroupOverlay.d.ts} +1 -1
- package/@types/{ViewOverlay.d.ts → view/ViewOverlay.d.ts} +1 -1
- package/@types/{ViewSlot.d.ts → view/ViewSlot.d.ts} +2 -2
- package/@types/{ViewTreeObserver.d.ts → view/ViewTreeObserver.d.ts} +1 -1
- package/@types/{Adapter.d.ts → widget/Adapter.d.ts} +2 -2
- package/@types/widget/DecorView.ts +5 -0
- package/@types/{EditRichText.d.ts → widget/EditRichText.d.ts} +4 -4
- package/@types/{EditText.d.ts → widget/EditText.d.ts} +1 -1
- package/@types/{FreezeLayoutViewGroup.d.ts → widget/FreezeLayoutViewGroup.d.ts} +1 -1
- package/@types/{GridView.d.ts → widget/GridView.d.ts} +1 -1
- package/@types/{HorizontalScrollView.ts → widget/HorizontalScrollView.ts} +1 -1
- package/@types/{Image.d.ts → widget/Image.d.ts} +1 -1
- package/@types/{ImageView.d.ts → widget/ImageView.d.ts} +1 -1
- package/@types/{ListView.d.ts → widget/ListView.d.ts} +1 -1
- package/@types/{ScrollView.d.ts → widget/ScrollView.d.ts} +1 -1
- package/@types/{Slot.d.ts → widget/Slot.d.ts} +1 -1
- package/@types/{TextView.d.ts → widget/TextView.d.ts} +1 -1
- package/@types/window/ApplicationWindow.ts +12 -0
- package/@types/window/PopupWindow.d.ts +41 -0
- package/@types/window/Window.d.ts +24 -0
- package/@types/{WindowManager.d.ts → window/WindowManager.d.ts} +8 -6
- package/index.d.ts +118 -111
- package/package.json +1 -1
- package/@types/Application.d.ts +0 -58
- package/@types/ApplicationWindow.d.ts +0 -47
- package/@types/Assets.d.ts +0 -6
- package/@types/Context.d.ts +0 -29
- package/@types/Gravity.d.ts +0 -41
- package/@types/InputMethodService.d.ts +0 -6
- package/@types/Paint.d.ts +0 -202
- package/@types/PopupWindow.d.ts +0 -73
- package/@types/ResourcesInflater.d.ts +0 -13
- package/@types/Window.d.ts +0 -45
- package/@types/XMLLayoutParser.d.ts +0 -12
- package/@types/XMLResourcesParser.d.ts +0 -11
- /package/@types/{AccelerateDecelerateInterpolator.d.ts → animation/AccelerateDecelerateInterpolator.d.ts} +0 -0
- /package/@types/{AccelerateInterpolator.d.ts → animation/AccelerateInterpolator.d.ts} +0 -0
- /package/@types/{BounceInterpolator.d.ts → animation/BounceInterpolator.d.ts} +0 -0
- /package/@types/{CycleInterpolator.d.ts → animation/CycleInterpolator.d.ts} +0 -0
- /package/@types/{DecelerateInterpolator.d.ts → animation/DecelerateInterpolator.d.ts} +0 -0
- /package/@types/{LinearInterpolator.d.ts → animation/LinearInterpolator.d.ts} +0 -0
- /package/@types/{PropertyValuesHolder.d.ts → animator/PropertyValuesHolder.d.ts} +0 -0
- /package/@types/{TimeInterpolator.d.ts → animator/TimeInterpolator.d.ts} +0 -0
- /package/@types/{TypeEvaluator.d.ts → animator/TypeEvaluator.d.ts} +0 -0
- /package/@types/{BlendMode.ts → canvas/BlendMode.ts} +0 -0
- /package/@types/{ColorFilter.ts → canvas/ColorFilter.ts} +0 -0
- /package/@types/{ImageFilter.ts → canvas/ImageFilter.ts} +0 -0
- /package/@types/{PathEffect.ts → canvas/PathEffect.ts} +0 -0
- /package/@types/{RendererBackend.ts → canvas/RendererBackend.ts} +0 -0
- /package/@types/{Shader.d.ts → canvas/Shader.d.ts} +0 -0
- /package/@types/{Typeface.d.ts → canvas/Typeface.d.ts} +0 -0
- /package/@types/{Configuration.d.ts → content/Configuration.d.ts} +0 -0
- /package/@types/{DisplayMetrics.d.ts → content/DisplayMetrics.d.ts} +0 -0
- /package/@types/{PixelFormat.ts → content/PixelFormat.ts} +0 -0
- /package/@types/{Theme.d.ts → content/Theme.d.ts} +0 -0
- /package/@types/{Environment.ts → evaluate/Environment.ts} +0 -0
- /package/@types/{KeyEvent.d.ts → event/KeyEvent.d.ts} +0 -0
- /package/@types/{MotionEvent.d.ts → event/MotionEvent.d.ts} +0 -0
- /package/@types/{Editable.d.ts → text/Editable.d.ts} +0 -0
- /package/@types/{ViewOutlineProvider.d.ts → view/ViewOutlineProvider.d.ts} +0 -0
- /package/@types/{ViewParent.d.ts → view/ViewParent.d.ts} +0 -0
- /package/@types/{Button.d.ts → widget/Button.d.ts} +0 -0
- /package/@types/{FreezeAbsoluteLayout.d.ts → widget/FreezeAbsoluteLayout.d.ts} +0 -0
- /package/@types/{ListAdapter.d.ts → widget/ListAdapter.d.ts} +0 -0
|
@@ -5,278 +5,656 @@ import {
|
|
|
5
5
|
} from "@compass-framework/library";
|
|
6
6
|
|
|
7
7
|
import { ViewOverlay } from "./ViewOverlay";
|
|
8
|
-
import { Context } from "
|
|
9
|
-
import { Configuration } from "
|
|
10
|
-
import { Rect } from "
|
|
11
|
-
import { AttributeSet } from "
|
|
12
|
-
import { Canvas } from "
|
|
13
|
-
import { Transformation } from "
|
|
14
|
-
import { KeyEvent } from "
|
|
15
|
-
import { Drawable } from "
|
|
8
|
+
import { Context } from "../content/Context";
|
|
9
|
+
import { Configuration } from "../content/Configuration";
|
|
10
|
+
import { Rect } from "../canvas/Rect";
|
|
11
|
+
import { AttributeSet } from "../content/AttributeSet";
|
|
12
|
+
import { Canvas } from "../canvas/Canvas";
|
|
13
|
+
import { Transformation } from "../animation/Transformation";
|
|
14
|
+
import { KeyEvent } from "../event/KeyEvent";
|
|
15
|
+
import { Drawable } from "../drawable/Drawable";
|
|
16
16
|
import { Outline } from "./Outline";
|
|
17
17
|
import { ViewTreeObserver } from "./ViewTreeObserver";
|
|
18
18
|
import { ViewGroup } from "./ViewGroup";
|
|
19
|
-
import { Animation } from "
|
|
20
|
-
import { MotionEvent } from "
|
|
21
|
-
import { Matrix } from "
|
|
22
|
-
import { Resources } from "
|
|
19
|
+
import { Animation } from "../animation/Animation";
|
|
20
|
+
import { MotionEvent } from "../event/MotionEvent";
|
|
21
|
+
import { Matrix } from "../canvas/Matrix";
|
|
22
|
+
import { Resources } from "../content/Resources";
|
|
23
23
|
import { ViewParent } from "./ViewParent";
|
|
24
24
|
import { ViewOutlineProvider } from "./ViewOutlineProvider";
|
|
25
|
-
import { DisplayMetrics } from "
|
|
26
|
-
import {
|
|
25
|
+
import { DisplayMetrics } from "../content/DisplayMetrics";
|
|
26
|
+
import { Window } from "../window/Window";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* 基础视图,负责测量、布局、绘制与事件分发。
|
|
30
30
|
*/
|
|
31
31
|
export declare class View implements Drawable.Callback {
|
|
32
|
+
/**
|
|
33
|
+
* 根据测量规格解析最终尺寸。
|
|
34
|
+
*/
|
|
32
35
|
public static resolveSize(size: number, measureSpec: number): number;
|
|
36
|
+
/**
|
|
37
|
+
* 从测量规格中提取测量模式。
|
|
38
|
+
*/
|
|
33
39
|
public static getMode(measureSpec: number): number;
|
|
40
|
+
/**
|
|
41
|
+
* 根据期望尺寸与测量规格计算默认尺寸。
|
|
42
|
+
*/
|
|
34
43
|
public static getDefaultSize(size: number, measureSpec: number): number;
|
|
35
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 不可见但仍占用布局空间。
|
|
47
|
+
*/
|
|
36
48
|
public static INVISIBLE: number;
|
|
49
|
+
/**
|
|
50
|
+
* 不可见且不占用布局空间。
|
|
51
|
+
*/
|
|
37
52
|
public static GONE: number;
|
|
53
|
+
/**
|
|
54
|
+
* 可见。
|
|
55
|
+
*/
|
|
38
56
|
public static VISIBLE: number;
|
|
39
57
|
|
|
58
|
+
/**
|
|
59
|
+
* 使用运行时上下文构造视图。
|
|
60
|
+
*/
|
|
40
61
|
public constructor(context: Context);
|
|
62
|
+
/**
|
|
63
|
+
* 使用上下文与属性集合构造视图。
|
|
64
|
+
*/
|
|
41
65
|
public constructor(context: Context, attrs: AttributeSet);
|
|
42
66
|
|
|
67
|
+
/**
|
|
68
|
+
* 通知宿主指定 Drawable 需要重绘。
|
|
69
|
+
*/
|
|
43
70
|
public invalidateDrawable(who: Drawable): void;
|
|
44
71
|
|
|
72
|
+
/**
|
|
73
|
+
* 在指定时间调度 Drawable 的回调。
|
|
74
|
+
*/
|
|
45
75
|
public scheduleDrawable(who: Drawable, what: Runnable, when: number): void;
|
|
46
76
|
|
|
77
|
+
/**
|
|
78
|
+
* 取消已调度的 Drawable 回调。
|
|
79
|
+
*/
|
|
47
80
|
public unScheduleDrawable(who: Drawable, what: Runnable): void;
|
|
48
81
|
|
|
82
|
+
/**
|
|
83
|
+
* 返回视图是否可获取焦点。
|
|
84
|
+
*/
|
|
49
85
|
public isFocusable(): boolean;
|
|
50
86
|
|
|
87
|
+
/**
|
|
88
|
+
* 返回触摸模式下是否可获取焦点。
|
|
89
|
+
*/
|
|
51
90
|
public isFocusableInTouchMode(): boolean;
|
|
52
91
|
|
|
92
|
+
/**
|
|
93
|
+
* 返回视图当前是否拥有焦点。
|
|
94
|
+
*/
|
|
53
95
|
public isFocused(): boolean;
|
|
54
96
|
|
|
97
|
+
/**
|
|
98
|
+
* 标记视图需要重绘。
|
|
99
|
+
*/
|
|
55
100
|
public invalidate(): void;
|
|
56
101
|
|
|
102
|
+
/**
|
|
103
|
+
* 标记视图轮廓需要重新计算。
|
|
104
|
+
*/
|
|
57
105
|
public invalidateOutline(): void;
|
|
58
106
|
|
|
107
|
+
/**
|
|
108
|
+
* 根据宽高测量规格测量视图。
|
|
109
|
+
*/
|
|
59
110
|
public measure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
60
111
|
|
|
112
|
+
/**
|
|
113
|
+
* 将视图布局到指定边界。
|
|
114
|
+
*/
|
|
61
115
|
public layout(left: number, top: number, right: number, bottom: number): void;
|
|
62
116
|
|
|
117
|
+
/**
|
|
118
|
+
* 将视图绘制到指定画布。
|
|
119
|
+
*/
|
|
63
120
|
public draw(canvas: Canvas): void;
|
|
64
121
|
|
|
122
|
+
/**
|
|
123
|
+
* 按数字 ID 查找子视图。
|
|
124
|
+
*/
|
|
65
125
|
public findViewById(id: number): View;
|
|
126
|
+
/**
|
|
127
|
+
* 按字符串 ID 查找子视图。
|
|
128
|
+
*/
|
|
66
129
|
public findViewById(id: string): View;
|
|
67
130
|
|
|
131
|
+
/**
|
|
132
|
+
* 按标签查找第一个匹配的子视图。
|
|
133
|
+
*/
|
|
68
134
|
public findViewByTag(tag: string): View;
|
|
69
135
|
|
|
136
|
+
/**
|
|
137
|
+
* 按标签查找所有匹配的子视图。
|
|
138
|
+
*/
|
|
70
139
|
public findViewsByTag(tag: string): ArrayList<View>;
|
|
71
140
|
|
|
141
|
+
/**
|
|
142
|
+
* 将任务投递到视图消息队列,返回是否投递成功。
|
|
143
|
+
*/
|
|
72
144
|
public post(action:Runnable): boolean;
|
|
73
145
|
|
|
146
|
+
/**
|
|
147
|
+
* 移除尚未执行的投递任务,返回是否移除成功。
|
|
148
|
+
*/
|
|
74
149
|
public removeCallbacks(action: Runnable): boolean;
|
|
75
150
|
|
|
151
|
+
/**
|
|
152
|
+
* 返回视图或其子孙是否拥有焦点。
|
|
153
|
+
*/
|
|
76
154
|
public hasFocus(): boolean;
|
|
77
155
|
|
|
156
|
+
/**
|
|
157
|
+
* 请求父视图重新测量并布局。
|
|
158
|
+
*/
|
|
78
159
|
public requestLayout(): void;
|
|
79
160
|
|
|
161
|
+
/**
|
|
162
|
+
* 请求获取焦点,返回是否成功。
|
|
163
|
+
*/
|
|
80
164
|
public requestFocus(): boolean;
|
|
81
165
|
|
|
166
|
+
/**
|
|
167
|
+
* 清除当前焦点。
|
|
168
|
+
*/
|
|
82
169
|
public clearFocus(): void;
|
|
83
170
|
|
|
171
|
+
/**
|
|
172
|
+
* 添加附着/分离窗口状态变化监听器。
|
|
173
|
+
*/
|
|
84
174
|
public addOnAttachStateChangeListener(listener:View.OnAttachStateChangeListener): void;
|
|
85
175
|
|
|
176
|
+
/**
|
|
177
|
+
* 移除附着/分离窗口状态变化监听器。
|
|
178
|
+
*/
|
|
86
179
|
public removeOnAttachStateChangeListener(listener:View.OnAttachStateChangeListener): void;
|
|
87
180
|
|
|
181
|
+
/**
|
|
182
|
+
* 添加布局变化监听器。
|
|
183
|
+
*/
|
|
88
184
|
public addOnLayoutChangeListener(listener: View.OnLayoutChangeListener): void;
|
|
89
185
|
|
|
186
|
+
/**
|
|
187
|
+
* 移除布局变化监听器。
|
|
188
|
+
*/
|
|
90
189
|
public removeOnLayoutChangeListener(listener: View.OnLayoutChangeListener): void;
|
|
91
190
|
|
|
191
|
+
/**
|
|
192
|
+
* 滚动到指定绝对位置。
|
|
193
|
+
*/
|
|
92
194
|
public scrollTo(x: number, y: number): void;
|
|
93
195
|
|
|
196
|
+
/**
|
|
197
|
+
* 相对当前滚动位置偏移指定距离。
|
|
198
|
+
*/
|
|
94
199
|
public scrollBy(x: number, y: number): void;
|
|
95
200
|
|
|
201
|
+
/**
|
|
202
|
+
* 触发点击回调。
|
|
203
|
+
*/
|
|
96
204
|
public performClick(): void;
|
|
97
205
|
|
|
206
|
+
/**
|
|
207
|
+
* 启动视图动画。
|
|
208
|
+
*/
|
|
98
209
|
public startAnimation(animation:Animation) : void;
|
|
99
210
|
|
|
211
|
+
/**
|
|
212
|
+
* 测量回调,子类在此计算自身尺寸。
|
|
213
|
+
*/
|
|
100
214
|
public onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
|
|
101
215
|
|
|
216
|
+
/**
|
|
217
|
+
* 绘制回调,子类在此绘制自身内容。
|
|
218
|
+
*/
|
|
102
219
|
public onDraw(canvas: Canvas): void;
|
|
103
220
|
|
|
221
|
+
/**
|
|
222
|
+
* 布局回调,子类在此安排子视图位置。
|
|
223
|
+
*/
|
|
104
224
|
public onLayout(changed: boolean, left: number, top: number, right: number, bottom: number): void;
|
|
105
225
|
|
|
226
|
+
/**
|
|
227
|
+
* 设备或主题等配置变化时回调。
|
|
228
|
+
*/
|
|
106
229
|
public onConfigurationChanged(newConfig: Configuration): void;
|
|
107
230
|
|
|
231
|
+
/**
|
|
232
|
+
* 屏幕密度变化时回调。
|
|
233
|
+
*/
|
|
108
234
|
public onDensityMetricsChanged(newConfig: Configuration): void;
|
|
109
235
|
|
|
236
|
+
/**
|
|
237
|
+
* 返回视图透明度,取值范围为 0–1。
|
|
238
|
+
*/
|
|
110
239
|
public getAlpha(): number;
|
|
111
240
|
|
|
241
|
+
/**
|
|
242
|
+
* 返回视图宽度。
|
|
243
|
+
*/
|
|
112
244
|
public getWidth(): number;
|
|
113
245
|
|
|
246
|
+
/**
|
|
247
|
+
* 返回视图高度。
|
|
248
|
+
*/
|
|
114
249
|
public getHeight(): number;
|
|
115
250
|
|
|
251
|
+
/**
|
|
252
|
+
* 返回视图变换矩阵。
|
|
253
|
+
*/
|
|
116
254
|
public getMatrix(): Matrix;
|
|
117
255
|
|
|
256
|
+
/**
|
|
257
|
+
* 返回父视图。
|
|
258
|
+
*/
|
|
118
259
|
public getParent(): ViewParent;
|
|
119
260
|
|
|
261
|
+
/**
|
|
262
|
+
* 返回视图 ID。
|
|
263
|
+
*/
|
|
120
264
|
public getId(): number;
|
|
121
265
|
|
|
266
|
+
/**
|
|
267
|
+
* 返回变换枢轴点的 X 坐标。
|
|
268
|
+
*/
|
|
122
269
|
public getPivotX(): number;
|
|
123
270
|
|
|
271
|
+
/**
|
|
272
|
+
* 返回变换枢轴点的 Y 坐标。
|
|
273
|
+
*/
|
|
124
274
|
public getPivotY(): number;
|
|
125
275
|
|
|
276
|
+
/**
|
|
277
|
+
* 返回视图在父容器中的 X 坐标。
|
|
278
|
+
*/
|
|
126
279
|
public getX(): number;
|
|
127
280
|
|
|
281
|
+
/**
|
|
282
|
+
* 返回视图在父容器中的 Y 坐标。
|
|
283
|
+
*/
|
|
128
284
|
public getY(): number;
|
|
129
285
|
|
|
286
|
+
/**
|
|
287
|
+
* 返回当前显示度量。
|
|
288
|
+
*/
|
|
130
289
|
public getDisplayMetrics(): DisplayMetrics;
|
|
131
290
|
|
|
291
|
+
/**
|
|
292
|
+
* 返回水平滚动偏移。
|
|
293
|
+
*/
|
|
132
294
|
public getScrollX(): number;
|
|
133
295
|
|
|
296
|
+
/**
|
|
297
|
+
* 返回垂直滚动偏移。
|
|
298
|
+
*/
|
|
134
299
|
public getScrollY(): number;
|
|
135
300
|
|
|
301
|
+
/**
|
|
302
|
+
* 返回父视图。
|
|
303
|
+
*/
|
|
136
304
|
public getParent(): ViewParent;
|
|
137
305
|
|
|
306
|
+
/**
|
|
307
|
+
* 返回可见性,取值为 VISIBLE、INVISIBLE 或 GONE。
|
|
308
|
+
*/
|
|
138
309
|
public getVisibility(): number;
|
|
139
310
|
|
|
311
|
+
/**
|
|
312
|
+
* 返回布局参数。
|
|
313
|
+
*/
|
|
140
314
|
public getLayoutParams(): ViewGroup.LayoutParams;
|
|
141
315
|
|
|
316
|
+
/**
|
|
317
|
+
* 返回关联的运行时上下文。
|
|
318
|
+
*/
|
|
142
319
|
public getContext(): Context;
|
|
143
320
|
|
|
321
|
+
/**
|
|
322
|
+
* 返回背景 Drawable。
|
|
323
|
+
*/
|
|
144
324
|
public getBackground(): Drawable;
|
|
145
325
|
|
|
326
|
+
/**
|
|
327
|
+
* 返回绕枢轴点的旋转角度(度)。
|
|
328
|
+
*/
|
|
146
329
|
public getRotation(): number;
|
|
147
330
|
|
|
331
|
+
/**
|
|
332
|
+
* 返回水平平移量。
|
|
333
|
+
*/
|
|
148
334
|
public getTranslationX(): number;
|
|
149
335
|
|
|
336
|
+
/**
|
|
337
|
+
* 返回垂直平移量。
|
|
338
|
+
*/
|
|
150
339
|
public getTranslationY(): number;
|
|
151
340
|
|
|
341
|
+
/**
|
|
342
|
+
* 返回水平缩放比例。
|
|
343
|
+
*/
|
|
152
344
|
public getScaleX(): number;
|
|
153
345
|
|
|
346
|
+
/**
|
|
347
|
+
* 返回垂直缩放比例。
|
|
348
|
+
*/
|
|
154
349
|
public getScaleY(): number;
|
|
155
350
|
|
|
351
|
+
/**
|
|
352
|
+
* 返回建议的最小宽度。
|
|
353
|
+
*/
|
|
156
354
|
public getMinimumWidth(): number;
|
|
157
355
|
|
|
356
|
+
/**
|
|
357
|
+
* 返回建议的最小高度。
|
|
358
|
+
*/
|
|
158
359
|
public getMinimumHeight(): number;
|
|
159
360
|
|
|
361
|
+
/**
|
|
362
|
+
* 返回视图标签。
|
|
363
|
+
*/
|
|
160
364
|
public getTag(): string;
|
|
161
365
|
|
|
366
|
+
/**
|
|
367
|
+
* 返回视图叠加层。
|
|
368
|
+
*/
|
|
162
369
|
public getOverlay(): ViewOverlay;
|
|
163
370
|
|
|
371
|
+
/**
|
|
372
|
+
* 返回视图树观察者。
|
|
373
|
+
*/
|
|
164
374
|
public getViewTreeObserver(): ViewTreeObserver;
|
|
165
375
|
|
|
376
|
+
/**
|
|
377
|
+
* 返回轮廓提供者。
|
|
378
|
+
*/
|
|
166
379
|
public getOutlineProvider(): ViewOutlineProvider;
|
|
167
380
|
|
|
381
|
+
/**
|
|
382
|
+
* 将视图在屏幕上的位置写入长度为 2 的数组。
|
|
383
|
+
*/
|
|
168
384
|
public getLocationOnScreen(location: number[]): void;
|
|
169
385
|
|
|
386
|
+
/**
|
|
387
|
+
* 返回上内边距。
|
|
388
|
+
*/
|
|
170
389
|
public getPaddingTop(): number;
|
|
171
390
|
|
|
391
|
+
/**
|
|
392
|
+
* 返回下内边距。
|
|
393
|
+
*/
|
|
172
394
|
public getPaddingBottom(): number;
|
|
173
395
|
|
|
396
|
+
/**
|
|
397
|
+
* 返回附着窗口时的临时绘制与变换信息。
|
|
398
|
+
*/
|
|
174
399
|
public getAttachInfo(): View.AttachInfo;
|
|
175
400
|
|
|
401
|
+
/**
|
|
402
|
+
* 返回左内边距。
|
|
403
|
+
*/
|
|
176
404
|
public getPaddingLeft(): number;
|
|
177
405
|
|
|
406
|
+
/**
|
|
407
|
+
* 返回右内边距。
|
|
408
|
+
*/
|
|
178
409
|
public getPaddingRight(): number;
|
|
179
410
|
|
|
411
|
+
/**
|
|
412
|
+
* 返回关联的资源管理器。
|
|
413
|
+
*/
|
|
180
414
|
public getResources(): Resources;
|
|
181
415
|
|
|
416
|
+
/**
|
|
417
|
+
* 返回未经缩放换算的左内边距。
|
|
418
|
+
*/
|
|
182
419
|
public getRawPaddingLeft(): number;
|
|
183
420
|
|
|
421
|
+
/**
|
|
422
|
+
* 返回未经缩放换算的上内边距。
|
|
423
|
+
*/
|
|
184
424
|
public getRawPaddingTop(): number;
|
|
185
425
|
|
|
426
|
+
/**
|
|
427
|
+
* 返回未经缩放换算的右内边距。
|
|
428
|
+
*/
|
|
186
429
|
public getRawPaddingRight(): number;
|
|
187
430
|
|
|
431
|
+
/**
|
|
432
|
+
* 返回未经缩放换算的下内边距。
|
|
433
|
+
*/
|
|
188
434
|
public getRawPaddingBottom(): number;
|
|
189
435
|
|
|
436
|
+
/**
|
|
437
|
+
* 设置前景 Drawable。
|
|
438
|
+
*/
|
|
190
439
|
public setForeground(foreground: Drawable): void;
|
|
191
440
|
|
|
441
|
+
/**
|
|
442
|
+
* 设置是否处于悬停状态。
|
|
443
|
+
*/
|
|
192
444
|
public setHovered(hovered: boolean): void;
|
|
193
445
|
|
|
446
|
+
/**
|
|
447
|
+
* 设置变换枢轴点的 X 坐标。
|
|
448
|
+
*/
|
|
194
449
|
public setPivotX(x: number): void;
|
|
195
450
|
|
|
451
|
+
/**
|
|
452
|
+
* 设置变换枢轴点的 Y 坐标。
|
|
453
|
+
*/
|
|
196
454
|
public setPivotY(y: number): void;
|
|
197
455
|
|
|
456
|
+
/**
|
|
457
|
+
* 设置水平缩放比例。
|
|
458
|
+
*/
|
|
198
459
|
public setScaleX(x: number): number;
|
|
199
460
|
|
|
461
|
+
/**
|
|
462
|
+
* 设置垂直缩放比例。
|
|
463
|
+
*/
|
|
200
464
|
public setScaleY(y: number): number;
|
|
201
465
|
|
|
466
|
+
/**
|
|
467
|
+
* 设置是否启用绘制缓存。
|
|
468
|
+
*/
|
|
202
469
|
public setDrawingCacheEnabled(enabled: boolean): void;
|
|
203
470
|
|
|
471
|
+
/**
|
|
472
|
+
* 设置纯色背景。
|
|
473
|
+
*/
|
|
204
474
|
public setBackgroundColor(color: number): void;
|
|
205
475
|
|
|
476
|
+
/**
|
|
477
|
+
* 设置背景 Drawable。
|
|
478
|
+
*/
|
|
206
479
|
public setBackgroundDrawable(drawable: Drawable): void;
|
|
207
480
|
|
|
481
|
+
/**
|
|
482
|
+
* 设置视图是否跳过自身绘制。
|
|
483
|
+
*/
|
|
208
484
|
public setWillNotDraw(willNotDraw: boolean) :void;
|
|
209
485
|
|
|
486
|
+
/**
|
|
487
|
+
* 设置测量后的宽高,通常在 onMeasure 中调用。
|
|
488
|
+
*/
|
|
210
489
|
public setMeasuredDimension(measuredWidth: number, measuredHeight: number): void;
|
|
211
490
|
|
|
491
|
+
/**
|
|
492
|
+
* 设置建议的最小宽度。
|
|
493
|
+
*/
|
|
212
494
|
public setMinimumWidth(minWidth: number): void;
|
|
213
495
|
|
|
496
|
+
/**
|
|
497
|
+
* 设置建议的最小高度。
|
|
498
|
+
*/
|
|
214
499
|
public setMinimumHeight(minHeight: number): void;
|
|
215
500
|
|
|
501
|
+
/**
|
|
502
|
+
* 设置视图透明度,取值范围为 0–1。
|
|
503
|
+
*/
|
|
216
504
|
public setAlpha(alpha: number): void;
|
|
217
505
|
|
|
506
|
+
/**
|
|
507
|
+
* 设置可见性,取值为 VISIBLE、INVISIBLE 或 GONE。
|
|
508
|
+
*/
|
|
218
509
|
public setVisibility(visibility: number): void;
|
|
219
510
|
|
|
511
|
+
/**
|
|
512
|
+
* 设置视图标签。
|
|
513
|
+
*/
|
|
220
514
|
public setTag(tag: string): void;
|
|
221
515
|
|
|
516
|
+
/**
|
|
517
|
+
* 设置轮廓提供者。
|
|
518
|
+
*/
|
|
222
519
|
public setOutlineProvider(provider: ViewOutlineProvider): void;
|
|
223
520
|
|
|
521
|
+
/**
|
|
522
|
+
* 设置视图是否可获取焦点。
|
|
523
|
+
*/
|
|
224
524
|
public setFocusable(focusable: boolean): void;
|
|
225
525
|
|
|
526
|
+
/**
|
|
527
|
+
* 设置触摸模式下是否可获取焦点。
|
|
528
|
+
*/
|
|
226
529
|
public setFocusableInTouchMode(focusableInTouchMode: boolean): void;
|
|
227
530
|
|
|
531
|
+
/**
|
|
532
|
+
* 设置点击事件监听器。
|
|
533
|
+
*/
|
|
228
534
|
public setOnClickListener(l: View.OnClickListener): void;
|
|
229
535
|
|
|
536
|
+
/**
|
|
537
|
+
* 设置 inflate 完成回调监听器。
|
|
538
|
+
*/
|
|
230
539
|
public setOnFinishInflateListener(l: View.OnFinishInflateListener): void;
|
|
231
540
|
|
|
541
|
+
/**
|
|
542
|
+
* 设置按键事件监听器。
|
|
543
|
+
*/
|
|
232
544
|
public setOnKeyListener(l: View.OnKeyListener): void;
|
|
233
545
|
|
|
546
|
+
/**
|
|
547
|
+
* 设置触摸事件监听器。
|
|
548
|
+
*/
|
|
234
549
|
public setOnTouchListener(l: View.OnTouchListener): void;
|
|
235
550
|
|
|
551
|
+
/**
|
|
552
|
+
* 设置视图是否可点击。
|
|
553
|
+
*/
|
|
236
554
|
public setClickable(clickable: boolean): void;
|
|
237
555
|
|
|
556
|
+
/**
|
|
557
|
+
* 设置通用运动事件监听器。
|
|
558
|
+
*/
|
|
238
559
|
public setOnGenericMotionListener(l: View.OnGenericMotionListener): void;
|
|
239
560
|
|
|
561
|
+
/**
|
|
562
|
+
* 设置四周内边距。
|
|
563
|
+
*/
|
|
240
564
|
public setPadding(left: number, top: number, right: number, bottom: number): void;
|
|
241
565
|
|
|
566
|
+
/**
|
|
567
|
+
* 设置布局参数。
|
|
568
|
+
*/
|
|
242
569
|
public setLayoutParams(params: ViewGroup.LayoutParams): void;
|
|
243
570
|
|
|
571
|
+
/**
|
|
572
|
+
* 设置绕枢轴点的旋转角度(度)。
|
|
573
|
+
*/
|
|
244
574
|
public setRotation(rotation: number): void;
|
|
245
575
|
|
|
576
|
+
/**
|
|
577
|
+
* 设置是否按轮廓裁剪绘制内容。
|
|
578
|
+
*/
|
|
246
579
|
public setClipToOutline(clipToOutline: boolean): void;
|
|
247
580
|
|
|
581
|
+
/**
|
|
582
|
+
* 设置水平平移量。
|
|
583
|
+
*/
|
|
248
584
|
public setTranslationX(translationX: number): void;
|
|
249
585
|
|
|
586
|
+
/**
|
|
587
|
+
* 设置垂直平移量。
|
|
588
|
+
*/
|
|
250
589
|
public setTranslationY(translationY: number): void;
|
|
251
590
|
|
|
591
|
+
/**
|
|
592
|
+
* 设置悬停事件监听器。
|
|
593
|
+
*/
|
|
252
594
|
public setOnHoverListener(l: View.OnHoverListener): void;
|
|
253
595
|
|
|
596
|
+
/**
|
|
597
|
+
* 设置悬停时的鼠标光标样式。
|
|
598
|
+
*/
|
|
254
599
|
public setHoverCursor(cursor: string): void;
|
|
255
600
|
|
|
601
|
+
/**
|
|
602
|
+
* 设置悬停时显示的 Drawable。
|
|
603
|
+
*/
|
|
256
604
|
public setHoverDrawable(drawable: Drawable): void;
|
|
257
605
|
|
|
606
|
+
/**
|
|
607
|
+
* 设置焦点变化监听器。
|
|
608
|
+
*/
|
|
258
609
|
public setOnFocusChangeListener(l: View.OnFocusChangeListener): void;
|
|
259
610
|
}
|
|
260
611
|
|
|
612
|
+
/**
|
|
613
|
+
* View 相关嵌套类型。
|
|
614
|
+
*/
|
|
261
615
|
export declare namespace View {
|
|
262
616
|
/**
|
|
263
617
|
* 按圆角半径生成视图轮廓的 OutlineProvider。
|
|
264
618
|
*/
|
|
265
619
|
export class ViewRadiusOutlineProvider extends ViewOutlineProvider {
|
|
620
|
+
/**
|
|
621
|
+
* 使用视图及四个圆角半径构造轮廓提供者。
|
|
622
|
+
*/
|
|
266
623
|
public constructor(view: View, ltr: number, lbr: number, rtr: number, rbr: number);
|
|
267
624
|
|
|
625
|
+
/**
|
|
626
|
+
* 设备或主题等配置变化时回调。
|
|
627
|
+
*/
|
|
268
628
|
public onConfigurationChanged(newConfig: Configuration): void;
|
|
269
629
|
|
|
630
|
+
/**
|
|
631
|
+
* 将视图外形轮廓写入指定 Outline。
|
|
632
|
+
*/
|
|
270
633
|
public getOutline(view: View, outline: Outline): void;
|
|
271
634
|
|
|
635
|
+
/**
|
|
636
|
+
* 同时设置四个圆角半径。
|
|
637
|
+
*/
|
|
272
638
|
public setRadius(value: number): void;
|
|
273
639
|
|
|
640
|
+
/**
|
|
641
|
+
* 设置左下圆角半径。
|
|
642
|
+
*/
|
|
274
643
|
public setLeftBottomRadius(value: number): void;
|
|
275
644
|
|
|
645
|
+
/**
|
|
646
|
+
* 设置左上圆角半径。
|
|
647
|
+
*/
|
|
276
648
|
public setLeftTopRadius(value: number): void;
|
|
277
649
|
|
|
650
|
+
/**
|
|
651
|
+
* 设置右下圆角半径。
|
|
652
|
+
*/
|
|
278
653
|
public setRightBottomRadius(value: number): void;
|
|
279
654
|
|
|
655
|
+
/**
|
|
656
|
+
* 设置右上圆角半径。
|
|
657
|
+
*/
|
|
280
658
|
public setRightTopRadius(value: number): void;
|
|
281
659
|
}
|
|
282
660
|
|
|
@@ -284,20 +662,44 @@ export declare namespace View {
|
|
|
284
662
|
* 视图附着窗口时的临时绘制与变换信息。
|
|
285
663
|
*/
|
|
286
664
|
export class AttachInfo {
|
|
665
|
+
/**
|
|
666
|
+
* 返回透明区域定位用的临时坐标数组。
|
|
667
|
+
*/
|
|
287
668
|
public getTransparentLocation(): Array<number>;
|
|
288
669
|
|
|
670
|
+
/**
|
|
671
|
+
* 返回临时变换矩阵。
|
|
672
|
+
*/
|
|
289
673
|
public getTmpMatrix(): Matrix;
|
|
290
674
|
|
|
675
|
+
/**
|
|
676
|
+
* 返回子视图失效定位用的临时坐标数组。
|
|
677
|
+
*/
|
|
291
678
|
public getInvalidateChildLocation(): Array<number>;
|
|
292
679
|
|
|
293
|
-
|
|
680
|
+
/**
|
|
681
|
+
* 返回所属窗口。
|
|
682
|
+
*/
|
|
683
|
+
public getWindow(): Window;
|
|
294
684
|
|
|
685
|
+
/**
|
|
686
|
+
* 返回临时轮廓对象。
|
|
687
|
+
*/
|
|
295
688
|
public getTmpOutline(): Outline;
|
|
296
689
|
|
|
690
|
+
/**
|
|
691
|
+
* 返回变换定位用的临时坐标数组。
|
|
692
|
+
*/
|
|
297
693
|
public getTmpTransformLocation(): Array<number>;
|
|
298
694
|
|
|
695
|
+
/**
|
|
696
|
+
* 返回变换计算用的临时矩形。
|
|
697
|
+
*/
|
|
299
698
|
public getTmpTransformRect(): Rect;
|
|
300
699
|
|
|
700
|
+
/**
|
|
701
|
+
* 返回当前变换信息。
|
|
702
|
+
*/
|
|
301
703
|
public getTransformation(): Transformation;
|
|
302
704
|
}
|
|
303
705
|
|
|
@@ -305,20 +707,50 @@ export declare namespace View {
|
|
|
305
707
|
* 测量规格工具,编码尺寸与测量模式。
|
|
306
708
|
*/
|
|
307
709
|
export class MeasureSpec {
|
|
710
|
+
/**
|
|
711
|
+
* 测量模式在规格值中的位移位数。
|
|
712
|
+
*/
|
|
308
713
|
public static MODE_SHIFT: number;
|
|
714
|
+
/**
|
|
715
|
+
* 测量模式掩码。
|
|
716
|
+
*/
|
|
309
717
|
public static MODE_MASK: number;
|
|
718
|
+
/**
|
|
719
|
+
* 未指定模式,父视图未施加约束。
|
|
720
|
+
*/
|
|
310
721
|
public static UNSPECIFIED: number;
|
|
722
|
+
/**
|
|
723
|
+
* 精确模式,子视图必须等于给定尺寸。
|
|
724
|
+
*/
|
|
311
725
|
public static EXACTLY: number;
|
|
726
|
+
/**
|
|
727
|
+
* 至多模式,子视图不得超过给定尺寸。
|
|
728
|
+
*/
|
|
312
729
|
public static AT_MOST: number;
|
|
313
730
|
|
|
731
|
+
/**
|
|
732
|
+
* 将尺寸与测量模式编码为测量规格。
|
|
733
|
+
*/
|
|
314
734
|
public static makeMeasureSpec(size: number, mode: number): number;
|
|
315
735
|
|
|
736
|
+
/**
|
|
737
|
+
* 创建安全的测量规格,避免溢出。
|
|
738
|
+
*/
|
|
316
739
|
public static makeSafeMeasureSpec(size: number, mode: number): number;
|
|
317
740
|
|
|
741
|
+
/**
|
|
742
|
+
* 从测量规格中提取测量模式。
|
|
743
|
+
*/
|
|
318
744
|
public static getMode(measureSpec: number): number;
|
|
319
745
|
|
|
746
|
+
/**
|
|
747
|
+
* 从测量规格中提取尺寸。
|
|
748
|
+
*/
|
|
320
749
|
public static getSize(measureSpec: number): number;
|
|
321
750
|
|
|
751
|
+
/**
|
|
752
|
+
* 按增量调整测量规格中的尺寸。
|
|
753
|
+
*/
|
|
322
754
|
public static adjust(measureSpec: number, delta: number): number;
|
|
323
755
|
}
|
|
324
756
|
|
|
@@ -326,8 +758,14 @@ export declare namespace View {
|
|
|
326
758
|
* 视图附着/分离窗口状态变化监听器。
|
|
327
759
|
*/
|
|
328
760
|
export interface OnAttachStateChangeListener {
|
|
761
|
+
/**
|
|
762
|
+
* 视图附着到窗口时回调。
|
|
763
|
+
*/
|
|
329
764
|
onViewAttachedToWindow(v: View): void;
|
|
330
765
|
|
|
766
|
+
/**
|
|
767
|
+
* 视图从窗口分离时回调。
|
|
768
|
+
*/
|
|
331
769
|
onViewDetachedFromWindow(v: View): void;
|
|
332
770
|
}
|
|
333
771
|
/**
|
|
@@ -339,6 +777,9 @@ export declare namespace View {
|
|
|
339
777
|
* 触摸事件监听器。
|
|
340
778
|
*/
|
|
341
779
|
export interface OnTouchListener {
|
|
780
|
+
/**
|
|
781
|
+
* 处理触摸事件,返回是否已消费。
|
|
782
|
+
*/
|
|
342
783
|
onTouch(v: View, event: MotionEvent): boolean;
|
|
343
784
|
}
|
|
344
785
|
/**
|
|
@@ -350,6 +791,9 @@ export declare namespace View {
|
|
|
350
791
|
* 点击事件监听器。
|
|
351
792
|
*/
|
|
352
793
|
export interface OnClickListener {
|
|
794
|
+
/**
|
|
795
|
+
* 视图被点击时回调。
|
|
796
|
+
*/
|
|
353
797
|
onClick(v: View): void;
|
|
354
798
|
}
|
|
355
799
|
/**
|
|
@@ -361,6 +805,9 @@ export declare namespace View {
|
|
|
361
805
|
* 悬停事件监听器。
|
|
362
806
|
*/
|
|
363
807
|
export interface OnHoverListener {
|
|
808
|
+
/**
|
|
809
|
+
* 处理悬停事件,返回是否已消费。
|
|
810
|
+
*/
|
|
364
811
|
onHover(v: View, event: MotionEvent): boolean;
|
|
365
812
|
}
|
|
366
813
|
/**
|
|
@@ -372,6 +819,9 @@ export declare namespace View {
|
|
|
372
819
|
* 按键事件监听器。
|
|
373
820
|
*/
|
|
374
821
|
export interface OnKeyListener {
|
|
822
|
+
/**
|
|
823
|
+
* 处理按键事件,返回是否已消费。
|
|
824
|
+
*/
|
|
375
825
|
onKey(v: View, keyCode: number, event: KeyEvent): boolean;
|
|
376
826
|
}
|
|
377
827
|
/**
|
|
@@ -383,6 +833,9 @@ export declare namespace View {
|
|
|
383
833
|
* 焦点变化监听器。
|
|
384
834
|
*/
|
|
385
835
|
export interface OnFocusChangeListener {
|
|
836
|
+
/**
|
|
837
|
+
* 焦点变化时回调。
|
|
838
|
+
*/
|
|
386
839
|
onFocusChange(v: View, hasFocus: boolean): void;
|
|
387
840
|
}
|
|
388
841
|
/**
|
|
@@ -394,6 +847,9 @@ export declare namespace View {
|
|
|
394
847
|
* 通用运动事件监听器。
|
|
395
848
|
*/
|
|
396
849
|
export interface OnGenericMotionListener {
|
|
850
|
+
/**
|
|
851
|
+
* 处理通用运动事件,返回是否已消费。
|
|
852
|
+
*/
|
|
397
853
|
onGenericMotion(v: View, event: MotionEvent): boolean;
|
|
398
854
|
}
|
|
399
855
|
/**
|
|
@@ -405,6 +861,9 @@ export declare namespace View {
|
|
|
405
861
|
* 布局尺寸或位置变化监听器。
|
|
406
862
|
*/
|
|
407
863
|
export interface OnLayoutChangeListener {
|
|
864
|
+
/**
|
|
865
|
+
* 布局边界变化时回调,参数为新旧左、上、右、下坐标。
|
|
866
|
+
*/
|
|
408
867
|
onLayoutChange(v: View, left: number, top: number, right: number, bottom: number, oldLeft: number, oldTop: number, oldRight: number, oldBottom: number):void;
|
|
409
868
|
}
|
|
410
869
|
/**
|
|
@@ -416,6 +875,9 @@ export declare namespace View {
|
|
|
416
875
|
* 视图完成 inflate 后的回调监听器。
|
|
417
876
|
*/
|
|
418
877
|
export interface OnFinishInflateListener {
|
|
878
|
+
/**
|
|
879
|
+
* 视图 inflate 完成时回调。
|
|
880
|
+
*/
|
|
419
881
|
onViewFinishInflate(v: View): void;
|
|
420
882
|
}
|
|
421
883
|
/**
|