@compass-framework/core 1.2.56 → 1.2.58
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/AbsoluteLayout.d.ts +6 -0
- package/@types/AccelerateDecelerateInterpolator.d.ts +3 -0
- package/@types/AccelerateInterpolator.d.ts +3 -0
- package/@types/Adapter.d.ts +6 -0
- package/@types/AlphaAnimation.d.ts +6 -1
- package/@types/Animation.d.ts +15 -2
- package/@types/AnimationSet.d.ts +5 -1
- package/@types/Animator.d.ts +12 -0
- package/@types/Application.d.ts +50 -11
- package/@types/ApplicationWindow.d.ts +9 -5
- package/@types/ArrayAdapter.d.ts +3 -0
- package/@types/Assets.d.ts +3 -0
- package/@types/AttributeSet.d.ts +5 -2
- package/@types/BaseAdapter.d.ts +3 -0
- package/@types/BlendMode.ts +150 -0
- package/@types/BounceInterpolator.d.ts +3 -0
- package/@types/Button.d.ts +3 -0
- package/@types/Canvas.d.ts +46 -60
- package/@types/Color.d.ts +40 -30
- package/@types/ColorDrawable.d.ts +5 -1
- package/@types/ColorFilter.ts +15 -0
- package/@types/Configuration.d.ts +3 -0
- package/@types/Context.d.ts +21 -3
- package/@types/ContextUtils.d.ts +3 -0
- package/@types/CornerPathEffect.d.ts +26 -0
- package/@types/CornersDrawable.d.ts +15 -6
- package/@types/CycleInterpolator.d.ts +3 -0
- package/@types/DecelerateInterpolator.d.ts +3 -0
- package/@types/DisplayMetrics.d.ts +3 -0
- package/@types/DoubleClick.d.ts +3 -0
- package/@types/DoubleClickListener.d.ts +6 -0
- package/@types/Drawable.d.ts +20 -5
- package/@types/EditRichText.d.ts +3 -0
- package/@types/EditText.d.ts +3 -0
- package/@types/Editable.d.ts +6 -0
- package/@types/Environment.ts +3 -0
- package/@types/FrameLayout.d.ts +8 -2
- package/@types/FreezeAbsoluteLayout.d.ts +6 -0
- package/@types/FreezeLayoutViewGroup.d.ts +3 -0
- package/@types/Gravity.d.ts +3 -0
- package/@types/GridLayout.d.ts +6 -0
- package/@types/GridLayoutAnimationController.d.ts +3 -0
- package/@types/GridView.d.ts +3 -0
- package/@types/HorizontalScrollView.ts +3 -0
- package/@types/Image.d.ts +28 -0
- package/@types/ImageDrawable.ts +43 -0
- package/@types/ImageFilter.ts +13 -0
- package/@types/ImageView.d.ts +9 -0
- package/@types/InputMethodService.d.ts +6 -0
- package/@types/Interpolator.d.ts +6 -0
- package/@types/KeyEvent.d.ts +3 -0
- package/@types/LayerDrawable.d.ts +6 -2
- package/@types/LayoutAnimationController.d.ts +9 -0
- package/@types/LayoutInflater.ts +3 -0
- package/@types/LinearGradient.d.ts +22 -2
- package/@types/LinearGradientDrawable.d.ts +3 -0
- package/@types/LinearInterpolator.d.ts +3 -0
- package/@types/LinearLayout.d.ts +6 -0
- package/@types/ListAdapter.d.ts +6 -0
- package/@types/ListView.d.ts +3 -0
- package/@types/Matrix.d.ts +110 -53
- package/@types/MotionEvent.d.ts +9 -0
- package/@types/{ICursor.d.ts → MouseCursor.ts} +18 -7
- package/@types/Outline.d.ts +6 -2
- package/@types/Paint.d.ts +141 -76
- package/@types/Path.d.ts +86 -44
- package/@types/PathEffect.ts +7 -1
- package/@types/Picture.d.ts +24 -15
- package/@types/PictureDrawable.d.ts +7 -5
- package/@types/PixelFormat.ts +3 -0
- package/@types/PopupWindow.d.ts +9 -6
- package/@types/PropertyValuesHolder.d.ts +3 -0
- package/@types/Rect.d.ts +66 -43
- package/@types/RelativeLayout.d.ts +6 -0
- package/@types/RendererBackend.ts +8 -0
- package/@types/Resolver.ts +7 -2
- package/@types/Resources.d.ts +3 -0
- package/@types/ResourcesInflater.d.ts +3 -0
- package/@types/RotateAnimation.d.ts +7 -3
- package/@types/ScaleAnimation.d.ts +7 -3
- package/@types/ScrollView.d.ts +3 -0
- package/@types/Shader.d.ts +15 -1
- package/@types/Shadow.d.ts +32 -6
- package/@types/Slot.d.ts +9 -0
- package/@types/Surface.d.ts +32 -0
- package/@types/SurfaceProvider.d.ts +25 -0
- package/@types/TabBarLayout.d.ts +12 -0
- package/@types/TableLayout.d.ts +6 -0
- package/@types/TableRow.d.ts +6 -0
- package/@types/TextView.d.ts +3 -0
- package/@types/Theme.d.ts +9 -0
- package/@types/TimeInterpolator.d.ts +6 -0
- package/@types/Transformation.d.ts +6 -0
- package/@types/TranslateAnimation.d.ts +6 -2
- package/@types/TypeEvaluator.d.ts +3 -0
- package/@types/Typeface.d.ts +21 -3
- package/@types/TypefaceFactory.d.ts +40 -4
- package/@types/ValueAnimator.d.ts +12 -0
- package/@types/View.d.ts +66 -0
- package/@types/ViewGroup.d.ts +9 -0
- package/@types/ViewGroupOverlay.d.ts +3 -0
- package/@types/ViewOutlineProvider.d.ts +3 -0
- package/@types/ViewOverlay.d.ts +3 -0
- package/@types/ViewParent.d.ts +6 -0
- package/@types/ViewSlot.d.ts +3 -0
- package/@types/ViewTreeObserver.d.ts +27 -0
- package/@types/{IWindow.d.ts → Window.d.ts} +10 -4
- package/@types/WindowManager.d.ts +14 -6
- package/@types/XMLLayoutParser.d.ts +3 -0
- package/@types/XMLResourcesParser.d.ts +3 -0
- package/@types/XMLViewFactoryRegistry.d.ts +18 -0
- package/index.d.ts +111 -113
- package/package.json +2 -2
- package/@types/ApplicationBoot.ts +0 -10
- package/@types/ApplicationContext.d.ts +0 -3
- package/@types/ApplicationFrame.d.ts +0 -33
- package/@types/ApplicationFrameContext.ts +0 -5
- package/@types/ApplicationFrameObserver.d.ts +0 -17
- package/@types/ApplicationFrameSettings.ts +0 -5
- package/@types/ApplicationManifest.d.ts +0 -5
- package/@types/Bitmap.d.ts +0 -7
- package/@types/BitmapDrawable.d.ts +0 -31
- package/@types/CornerPathEffect.ts +0 -7
- package/@types/InputMethodServer.ts +0 -1
- package/@types/Readying.ts +0 -3
- package/@types/StackLayout.d.ts +0 -9
- package/@types/WindowContext.d.ts +0 -9
package/@types/View.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ import { ViewOutlineProvider } from "./ViewOutlineProvider";
|
|
|
25
25
|
import { DisplayMetrics } from "./DisplayMetrics";
|
|
26
26
|
import { IWindow } from "./IWindow";
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* 基础视图,负责测量、布局、绘制与事件分发。
|
|
30
|
+
*/
|
|
28
31
|
export declare class View implements Drawable.Callback {
|
|
29
32
|
public static resolveSize(size: number, measureSpec: number): number;
|
|
30
33
|
public static getMode(measureSpec: number): number;
|
|
@@ -256,6 +259,9 @@ export declare class View implements Drawable.Callback {
|
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
export declare namespace View {
|
|
262
|
+
/**
|
|
263
|
+
* 按圆角半径生成视图轮廓的 OutlineProvider。
|
|
264
|
+
*/
|
|
259
265
|
export class ViewRadiusOutlineProvider extends ViewOutlineProvider {
|
|
260
266
|
public constructor(view: View, ltr: number, lbr: number, rtr: number, rbr: number);
|
|
261
267
|
|
|
@@ -274,6 +280,9 @@ export declare namespace View {
|
|
|
274
280
|
public setRightTopRadius(value: number): void;
|
|
275
281
|
}
|
|
276
282
|
|
|
283
|
+
/**
|
|
284
|
+
* 视图附着窗口时的临时绘制与变换信息。
|
|
285
|
+
*/
|
|
277
286
|
export class AttachInfo {
|
|
278
287
|
public getTransparentLocation(): Array<number>;
|
|
279
288
|
|
|
@@ -292,6 +301,9 @@ export declare namespace View {
|
|
|
292
301
|
public getTransformation(): Transformation;
|
|
293
302
|
}
|
|
294
303
|
|
|
304
|
+
/**
|
|
305
|
+
* 测量规格工具,编码尺寸与测量模式。
|
|
306
|
+
*/
|
|
295
307
|
export class MeasureSpec {
|
|
296
308
|
public static MODE_SHIFT: number;
|
|
297
309
|
public static MODE_MASK: number;
|
|
@@ -310,50 +322,104 @@ export declare namespace View {
|
|
|
310
322
|
public static adjust(measureSpec: number, delta: number): number;
|
|
311
323
|
}
|
|
312
324
|
|
|
325
|
+
/**
|
|
326
|
+
* 视图附着/分离窗口状态变化监听器。
|
|
327
|
+
*/
|
|
313
328
|
export interface OnAttachStateChangeListener {
|
|
314
329
|
onViewAttachedToWindow(v: View): void;
|
|
315
330
|
|
|
316
331
|
onViewDetachedFromWindow(v: View): void;
|
|
317
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* OnAttachStateChangeListener 的接口模板实现。
|
|
335
|
+
*/
|
|
318
336
|
export class OnAttachStateChangeListener extends InterfaceTemplate {}
|
|
319
337
|
|
|
338
|
+
/**
|
|
339
|
+
* 触摸事件监听器。
|
|
340
|
+
*/
|
|
320
341
|
export interface OnTouchListener {
|
|
321
342
|
onTouch(v: View, event: MotionEvent): boolean;
|
|
322
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* OnTouchListener 的接口模板实现。
|
|
346
|
+
*/
|
|
323
347
|
export class OnTouchListener extends InterfaceTemplate {}
|
|
324
348
|
|
|
349
|
+
/**
|
|
350
|
+
* 点击事件监听器。
|
|
351
|
+
*/
|
|
325
352
|
export interface OnClickListener {
|
|
326
353
|
onClick(v: View): void;
|
|
327
354
|
}
|
|
355
|
+
/**
|
|
356
|
+
* OnClickListener 的接口模板实现。
|
|
357
|
+
*/
|
|
328
358
|
export class OnClickListener extends InterfaceTemplate {}
|
|
329
359
|
|
|
360
|
+
/**
|
|
361
|
+
* 悬停事件监听器。
|
|
362
|
+
*/
|
|
330
363
|
export interface OnHoverListener {
|
|
331
364
|
onHover(v: View, event: MotionEvent): boolean;
|
|
332
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* OnHoverListener 的接口模板实现。
|
|
368
|
+
*/
|
|
333
369
|
export class OnHoverListener extends InterfaceTemplate {}
|
|
334
370
|
|
|
371
|
+
/**
|
|
372
|
+
* 按键事件监听器。
|
|
373
|
+
*/
|
|
335
374
|
export interface OnKeyListener {
|
|
336
375
|
onKey(v: View, keyCode: number, event: KeyEvent): boolean;
|
|
337
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* OnKeyListener 的接口模板实现。
|
|
379
|
+
*/
|
|
338
380
|
export class OnKeyListener extends InterfaceTemplate {}
|
|
339
381
|
|
|
382
|
+
/**
|
|
383
|
+
* 焦点变化监听器。
|
|
384
|
+
*/
|
|
340
385
|
export interface OnFocusChangeListener {
|
|
341
386
|
onFocusChange(v: View, hasFocus: boolean): void;
|
|
342
387
|
}
|
|
388
|
+
/**
|
|
389
|
+
* OnFocusChangeListener 的接口模板实现。
|
|
390
|
+
*/
|
|
343
391
|
export class OnFocusChangeListener extends InterfaceTemplate {}
|
|
344
392
|
|
|
393
|
+
/**
|
|
394
|
+
* 通用运动事件监听器。
|
|
395
|
+
*/
|
|
345
396
|
export interface OnGenericMotionListener {
|
|
346
397
|
onGenericMotion(v: View, event: MotionEvent): boolean;
|
|
347
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* OnGenericMotionListener 的接口模板实现。
|
|
401
|
+
*/
|
|
348
402
|
export class OnGenericMotionListener extends InterfaceTemplate {}
|
|
349
403
|
|
|
404
|
+
/**
|
|
405
|
+
* 布局尺寸或位置变化监听器。
|
|
406
|
+
*/
|
|
350
407
|
export interface OnLayoutChangeListener {
|
|
351
408
|
onLayoutChange(v: View, left: number, top: number, right: number, bottom: number, oldLeft: number, oldTop: number, oldRight: number, oldBottom: number):void;
|
|
352
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* OnLayoutChangeListener 的接口模板实现。
|
|
412
|
+
*/
|
|
353
413
|
export class OnLayoutChangeListener extends InterfaceTemplate {}
|
|
354
414
|
|
|
415
|
+
/**
|
|
416
|
+
* 视图完成 inflate 后的回调监听器。
|
|
417
|
+
*/
|
|
355
418
|
export interface OnFinishInflateListener {
|
|
356
419
|
onViewFinishInflate(v: View): void;
|
|
357
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* OnFinishInflateListener 的接口模板实现。
|
|
423
|
+
*/
|
|
358
424
|
export class OnFinishInflateListener extends InterfaceTemplate {}
|
|
359
425
|
}
|
package/@types/ViewGroup.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { ViewParent } from "./ViewParent";
|
|
|
6
6
|
import { MotionEvent } from "./MotionEvent";
|
|
7
7
|
import { DisplayMetrics } from "./DisplayMetrics";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* 视图组,可容纳并管理子视图的测量、布局与触摸分发。
|
|
11
|
+
*/
|
|
9
12
|
@Implements(ViewParent)
|
|
10
13
|
export declare abstract class ViewGroup extends View implements ViewParent {
|
|
11
14
|
public static FLAG_USE_CHILD_DRAWING_ORDER: number;
|
|
@@ -58,6 +61,9 @@ export declare abstract class ViewGroup extends View implements ViewParent {
|
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
export declare namespace ViewGroup {
|
|
64
|
+
/**
|
|
65
|
+
* 子视图布局参数,描述宽高约束。
|
|
66
|
+
*/
|
|
61
67
|
class LayoutParams {
|
|
62
68
|
public static MATCH_PARENT: number;
|
|
63
69
|
public static WRAP_CONTENT: number;
|
|
@@ -83,6 +89,9 @@ export declare namespace ViewGroup {
|
|
|
83
89
|
public setHeight(height: number): void;
|
|
84
90
|
}
|
|
85
91
|
|
|
92
|
+
/**
|
|
93
|
+
* 带外边距的布局参数。
|
|
94
|
+
*/
|
|
86
95
|
class MarginLayoutParams extends LayoutParams {
|
|
87
96
|
public setLeftMargin(margin: number): void;
|
|
88
97
|
|
|
@@ -2,6 +2,9 @@ import { ViewOverlay } from "./ViewOverlay";
|
|
|
2
2
|
import { Drawable } from "./Drawable";
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 视图组叠加层,可叠加 Drawable 或子视图。
|
|
7
|
+
*/
|
|
5
8
|
export declare class ViewGroupOverlay extends ViewOverlay {
|
|
6
9
|
public add(drawable: Drawable): void;
|
|
7
10
|
public add(view: View): void;
|
package/@types/ViewOverlay.d.ts
CHANGED
package/@types/ViewParent.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { InterfaceTemplate, Nullable } from "@compass-framework/library";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 视图父节点接口,提供层级关系与触摸拦截控制。
|
|
5
|
+
*/
|
|
3
6
|
export interface ViewParent {
|
|
4
7
|
getParent(): Nullable<ViewParent>;
|
|
5
8
|
|
|
6
9
|
requestDisallowInterceptTouchEvent(disallowIntercept: boolean): void
|
|
7
10
|
}
|
|
8
11
|
|
|
12
|
+
/**
|
|
13
|
+
* ViewParent 的接口模板实现。
|
|
14
|
+
*/
|
|
9
15
|
export class ViewParent extends InterfaceTemplate {}
|
package/@types/ViewSlot.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { FrameLayout } from "./FrameLayout";
|
|
|
3
3
|
import { Slot } from "./Slot";
|
|
4
4
|
import { View } from "./View";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* 视图插槽容器,可替换内部目标视图。
|
|
8
|
+
*/
|
|
6
9
|
@Implements(Slot)
|
|
7
10
|
export declare class ViewSlot extends FrameLayout implements Slot {
|
|
8
11
|
replace(target: View, options?: Slot.Options): void;
|
|
@@ -2,6 +2,9 @@ import { InterfaceTemplate } from "@compass-framework/library";
|
|
|
2
2
|
import { View } from "./View";
|
|
3
3
|
import { MotionEvent } from "./MotionEvent";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 视图树观察者,监听全局布局、绘制前与焦点/触摸变化。
|
|
7
|
+
*/
|
|
5
8
|
export declare class ViewTreeObserver {
|
|
6
9
|
public addOnGlobalLayoutListener(listener: ViewTreeObserver.OnGlobalLayoutListener) :void;
|
|
7
10
|
|
|
@@ -21,23 +24,47 @@ export declare class ViewTreeObserver {
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export declare namespace ViewTreeObserver {
|
|
27
|
+
/**
|
|
28
|
+
* 全局布局完成监听器。
|
|
29
|
+
*/
|
|
24
30
|
export interface OnGlobalLayoutListener {
|
|
25
31
|
onGlobalLayout(): void;
|
|
26
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* OnGlobalLayoutListener 的接口模板实现。
|
|
35
|
+
*/
|
|
27
36
|
export class OnGlobalLayoutListener extends InterfaceTemplate {}
|
|
28
37
|
|
|
38
|
+
/**
|
|
39
|
+
* 绘制前回调监听器。
|
|
40
|
+
*/
|
|
29
41
|
export interface OnPreDrawListener {
|
|
30
42
|
onPreDraw(): boolean;
|
|
31
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* OnPreDrawListener 的接口模板实现。
|
|
46
|
+
*/
|
|
32
47
|
export class OnPreDrawListener extends InterfaceTemplate {}
|
|
33
48
|
|
|
49
|
+
/**
|
|
50
|
+
* 全局触摸事件监听器。
|
|
51
|
+
*/
|
|
34
52
|
export interface OnGlobalTouchEventListener {
|
|
35
53
|
onGlobalTouch(ev: MotionEvent): void
|
|
36
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* OnGlobalTouchEventListener 的接口模板实现。
|
|
57
|
+
*/
|
|
37
58
|
export class OnGlobalTouchEventListener extends InterfaceTemplate {}
|
|
38
59
|
|
|
60
|
+
/**
|
|
61
|
+
* 全局焦点变化监听器。
|
|
62
|
+
*/
|
|
39
63
|
export interface OnGlobalFocusChangeListener {
|
|
40
64
|
onGlobalFocusChanged(oldFocus: View, newFocus: View): void;
|
|
41
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* OnGlobalFocusChangeListener 的接口模板实现。
|
|
68
|
+
*/
|
|
42
69
|
export class OnGlobalFocusChangeListener extends InterfaceTemplate {}
|
|
43
70
|
}
|
|
@@ -2,10 +2,13 @@ import { ArrayList, InterfaceTemplate, XML } from "@compass-framework/library";
|
|
|
2
2
|
import { Resources } from "./Resources";
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
import { ViewGroup } from "./ViewGroup";
|
|
5
|
-
import { WindowContext } from "./WindowContext";
|
|
6
5
|
import { WindowManager } from "./WindowManager";
|
|
6
|
+
import { Context } from "./Context";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* 窗口契约,定义内容视图与生命周期回调。
|
|
10
|
+
*/
|
|
11
|
+
export interface Window {
|
|
9
12
|
findViewsByTag(tag: string): ArrayList<View>;
|
|
10
13
|
|
|
11
14
|
findViewByTag(tag: string): View;
|
|
@@ -21,7 +24,7 @@ export interface IWindow {
|
|
|
21
24
|
|
|
22
25
|
getLayoutParams(): WindowManager.LayoutParams;
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
getContext(): Context;
|
|
25
28
|
|
|
26
29
|
getDecorView(): ViewGroup;
|
|
27
30
|
|
|
@@ -34,6 +37,9 @@ export interface IWindow {
|
|
|
34
37
|
setContentXML(xml: XML): void;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Window 接口的实现基类。
|
|
42
|
+
*/
|
|
43
|
+
export class Window extends InterfaceTemplate {
|
|
38
44
|
|
|
39
45
|
}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
|
-
import { IWindow } from "./IWindow";
|
|
3
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 窗口管理器,负责添加、移除与更新窗口布局。
|
|
5
|
+
*/
|
|
4
6
|
export declare class WindowManager {
|
|
5
|
-
public
|
|
6
|
-
public
|
|
7
|
+
public addWindow(window: Window): void;
|
|
8
|
+
public addWindow(window: Window, params: WindowManager.LayoutParams): void;
|
|
7
9
|
|
|
8
|
-
public
|
|
10
|
+
public removeWindow(window: Window): void;
|
|
9
11
|
|
|
10
|
-
public updateWindowLayout(window:
|
|
11
|
-
public updateWindowLayout(window:
|
|
12
|
+
public updateWindowLayout(window: Window): void;
|
|
13
|
+
public updateWindowLayout(window: Window, params: WindowManager.LayoutParams): void;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
/**
|
|
17
|
+
* WindowManager 相关布局参数类型。
|
|
18
|
+
*/
|
|
14
19
|
export declare namespace WindowManager {
|
|
20
|
+
/**
|
|
21
|
+
* 窗口布局参数,控制层级、透明度与对齐。
|
|
22
|
+
*/
|
|
15
23
|
export class LayoutParams extends ViewGroup.LayoutParams {
|
|
16
24
|
public static TYPE_APPLICATION_ATTACHED_DIALOG: number;
|
|
17
25
|
|
|
@@ -3,6 +3,9 @@ import { Context } from "./Context";
|
|
|
3
3
|
import { View } from "./View";
|
|
4
4
|
import { AttributeSet } from "./AttributeSet";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* XML 视图工厂注册表,按标签名创建视图实例。
|
|
8
|
+
*/
|
|
6
9
|
export declare class XMLViewFactoryRegistry {
|
|
7
10
|
public registryViewFactory<T extends View>(name: string, factory: XMLViewFactoryRegistry.Factory<T>, overwrite?: boolean): XMLViewFactoryRegistry;
|
|
8
11
|
|
|
@@ -21,15 +24,27 @@ export declare class XMLViewFactoryRegistry {
|
|
|
21
24
|
public getDefaultAttribute(attr?: XMLViewFactoryRegistry.Attribute): XMLViewFactoryRegistry.Attribute;
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
/**
|
|
28
|
+
* XMLViewFactoryRegistry 相关工厂与属性类型。
|
|
29
|
+
*/
|
|
24
30
|
export declare namespace XMLViewFactoryRegistry {
|
|
31
|
+
/**
|
|
32
|
+
* 默认属性键值映射。
|
|
33
|
+
*/
|
|
25
34
|
export type Attribute = { [key: string]: string };
|
|
26
35
|
|
|
36
|
+
/**
|
|
37
|
+
* XML 视图工厂接口。
|
|
38
|
+
*/
|
|
27
39
|
export interface Factory<T extends View> {
|
|
28
40
|
onRegistry(context: Context): void;
|
|
29
41
|
|
|
30
42
|
getView(context: Context, attrs: AttributeSet): T;
|
|
31
43
|
}
|
|
32
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 基于类的默认视图工厂。
|
|
47
|
+
*/
|
|
33
48
|
export class ViewFactory<T extends View> implements Factory<T> {
|
|
34
49
|
public constructor(clazz:Class<View>);
|
|
35
50
|
|
|
@@ -38,6 +53,9 @@ export declare namespace XMLViewFactoryRegistry {
|
|
|
38
53
|
public getView(context: Context, attrs: AttributeSet): T;
|
|
39
54
|
}
|
|
40
55
|
|
|
56
|
+
/**
|
|
57
|
+
* 基于回调的自定义视图工厂。
|
|
58
|
+
*/
|
|
41
59
|
export class CustomFactory<T extends View> implements Factory<T> {
|
|
42
60
|
public constructor(callback: BiFunction<Context, AttributeSet, View>);
|
|
43
61
|
|
package/index.d.ts
CHANGED
|
@@ -1,113 +1,111 @@
|
|
|
1
|
-
export * from "./@types/AbsoluteLayout";
|
|
2
|
-
export * from "./@types/
|
|
3
|
-
export * from "./@types/
|
|
4
|
-
export * from "./@types/
|
|
5
|
-
export * from "./@types/
|
|
6
|
-
export * from "./@types/Animation";
|
|
7
|
-
export * from "./@types/AnimationSet";
|
|
8
|
-
export * from "./@types/
|
|
9
|
-
export * from "./@types/
|
|
10
|
-
export * from "./@types/
|
|
11
|
-
export * from "./@types/
|
|
12
|
-
export * from "./@types/
|
|
13
|
-
export * from "./@types/
|
|
14
|
-
export * from "./@types/
|
|
15
|
-
export * from "./@types/
|
|
16
|
-
export * from "./@types/
|
|
17
|
-
export * from "./@types/
|
|
18
|
-
export * from "./@types/
|
|
19
|
-
export * from "./@types/
|
|
20
|
-
export * from "./@types/
|
|
21
|
-
export * from "./@types/
|
|
22
|
-
export * from "./@types/
|
|
23
|
-
export * from "./@types/
|
|
24
|
-
export * from "./@types/
|
|
25
|
-
export * from "./@types/
|
|
26
|
-
export * from "./@types/
|
|
27
|
-
export * from "./@types/CycleInterpolator";
|
|
28
|
-
export * from "./@types/
|
|
29
|
-
export * from "./@types/
|
|
30
|
-
export * from "./@types/
|
|
31
|
-
export * from "./@types/
|
|
32
|
-
export * from "./@types/
|
|
33
|
-
export * from "./@types/
|
|
34
|
-
export * from "./@types/
|
|
35
|
-
export * from "./@types/
|
|
36
|
-
export * from "./@types/
|
|
37
|
-
export * from "./@types/
|
|
38
|
-
export * from "./@types/
|
|
39
|
-
export * from "./@types/
|
|
40
|
-
export * from "./@types/
|
|
41
|
-
export * from "./@types/
|
|
42
|
-
export * from "./@types/
|
|
43
|
-
export * from "./@types/
|
|
44
|
-
export * from "./@types/
|
|
45
|
-
export * from "./@types/
|
|
46
|
-
export * from "./@types/
|
|
47
|
-
export * from "./@types/
|
|
48
|
-
export * from "./@types/
|
|
49
|
-
export * from "./@types/
|
|
50
|
-
export * from "./@types/
|
|
51
|
-
export * from "./@types/
|
|
52
|
-
export * from "./@types/
|
|
53
|
-
export * from "./@types/
|
|
54
|
-
export * from "./@types/
|
|
55
|
-
export * from "./@types/
|
|
56
|
-
export * from "./@types/
|
|
57
|
-
export * from "./@types/
|
|
58
|
-
export * from "./@types/
|
|
59
|
-
export * from "./@types/
|
|
60
|
-
export * from "./@types/
|
|
61
|
-
export * from "./@types/
|
|
62
|
-
export * from "./@types/
|
|
63
|
-
export * from
|
|
64
|
-
export * from
|
|
65
|
-
export * from "./@types/
|
|
66
|
-
export * from "./@types/
|
|
67
|
-
export * from "./@types/
|
|
68
|
-
export * from "./@types/
|
|
69
|
-
export * from "./@types/
|
|
70
|
-
export * from "./@types/
|
|
71
|
-
export * from "./@types/
|
|
72
|
-
export * from "./@types/
|
|
73
|
-
export * from "./@types/
|
|
74
|
-
export * from "./@types/
|
|
75
|
-
export * from "./@types/
|
|
76
|
-
export * from "./@types/
|
|
77
|
-
export * from "./@types/
|
|
78
|
-
export * from "./@types/
|
|
79
|
-
export * from "./@types/
|
|
80
|
-
export * from "./@types/
|
|
81
|
-
export * from "./@types/
|
|
82
|
-
export * from "./@types/
|
|
83
|
-
export * from "./@types/
|
|
84
|
-
export * from "./@types/
|
|
85
|
-
export * from "./@types/
|
|
86
|
-
export * from "./@types/
|
|
87
|
-
export * from "./@types/
|
|
88
|
-
export * from "./@types/
|
|
89
|
-
export * from "./@types/
|
|
90
|
-
export * from "./@types/
|
|
91
|
-
export * from "./@types/
|
|
92
|
-
export * from "./@types/
|
|
93
|
-
export * from "./@types/
|
|
94
|
-
export * from "./@types/
|
|
95
|
-
export * from "./@types/
|
|
96
|
-
export * from "./@types/
|
|
97
|
-
export * from "./@types/
|
|
98
|
-
export * from "./@types/
|
|
99
|
-
export * from "./@types/
|
|
100
|
-
export * from "./@types/
|
|
101
|
-
export * from
|
|
102
|
-
export * from
|
|
103
|
-
export * from
|
|
104
|
-
export * from
|
|
105
|
-
export * from
|
|
106
|
-
export * from
|
|
107
|
-
export * from
|
|
108
|
-
export * from
|
|
109
|
-
export * from
|
|
110
|
-
export * from
|
|
111
|
-
export * from
|
|
112
|
-
export * from "./@types/PixelFormat"
|
|
113
|
-
export * from "./@types/DisplayMetrics"
|
|
1
|
+
export * from "./@types/AbsoluteLayout";
|
|
2
|
+
export * from "./@types/AccelerateDecelerateInterpolator";
|
|
3
|
+
export * from "./@types/AccelerateInterpolator";
|
|
4
|
+
export * from "./@types/Adapter";
|
|
5
|
+
export * from "./@types/AlphaAnimation";
|
|
6
|
+
export * from "./@types/Animation";
|
|
7
|
+
export * from "./@types/AnimationSet";
|
|
8
|
+
export * from "./@types/Animator";
|
|
9
|
+
export * from "./@types/Application";
|
|
10
|
+
export * from "./@types/ApplicationWindow";
|
|
11
|
+
export * from "./@types/ArrayAdapter";
|
|
12
|
+
export * from "./@types/Assets";
|
|
13
|
+
export * from "./@types/AttributeSet";
|
|
14
|
+
export * from "./@types/BaseAdapter";
|
|
15
|
+
export * from "./@types/BlendMode";
|
|
16
|
+
export * from "./@types/BounceInterpolator";
|
|
17
|
+
export * from "./@types/Button";
|
|
18
|
+
export * from "./@types/Canvas";
|
|
19
|
+
export * from "./@types/Color";
|
|
20
|
+
export * from "./@types/ColorDrawable";
|
|
21
|
+
export * from "./@types/ColorFilter";
|
|
22
|
+
export * from "./@types/Configuration";
|
|
23
|
+
export * from "./@types/Context";
|
|
24
|
+
export * from "./@types/ContextUtils";
|
|
25
|
+
export * from "./@types/CornerPathEffect";
|
|
26
|
+
export * from "./@types/CornersDrawable";
|
|
27
|
+
export * from "./@types/CycleInterpolator";
|
|
28
|
+
export * from "./@types/DecelerateInterpolator";
|
|
29
|
+
export * from "./@types/DisplayMetrics";
|
|
30
|
+
export * from "./@types/DoubleClick";
|
|
31
|
+
export * from "./@types/DoubleClickListener";
|
|
32
|
+
export * from "./@types/Drawable";
|
|
33
|
+
export * from "./@types/Editable";
|
|
34
|
+
export * from "./@types/EditRichText";
|
|
35
|
+
export * from "./@types/EditText";
|
|
36
|
+
export * from "./@types/Environment";
|
|
37
|
+
export * from "./@types/FrameLayout";
|
|
38
|
+
export * from "./@types/FreezeAbsoluteLayout";
|
|
39
|
+
export * from "./@types/FreezeLayoutViewGroup";
|
|
40
|
+
export * from "./@types/Gravity";
|
|
41
|
+
export * from "./@types/GridLayout";
|
|
42
|
+
export * from "./@types/GridLayoutAnimationController";
|
|
43
|
+
export * from "./@types/GridView";
|
|
44
|
+
export * from "./@types/HorizontalScrollView";
|
|
45
|
+
export * from "./@types/Image";
|
|
46
|
+
export * from "./@types/ImageDrawable";
|
|
47
|
+
export * from "./@types/ImageFilter";
|
|
48
|
+
export * from "./@types/ImageView";
|
|
49
|
+
export * from "./@types/InputMethodService";
|
|
50
|
+
export * from "./@types/Interpolator";
|
|
51
|
+
export * from "./@types/KeyEvent";
|
|
52
|
+
export * from "./@types/LayerDrawable";
|
|
53
|
+
export * from "./@types/LayoutAnimationController";
|
|
54
|
+
export * from "./@types/LayoutInflater";
|
|
55
|
+
export * from "./@types/LinearGradient";
|
|
56
|
+
export * from "./@types/LinearGradientDrawable";
|
|
57
|
+
export * from "./@types/LinearInterpolator";
|
|
58
|
+
export * from "./@types/LinearLayout";
|
|
59
|
+
export * from "./@types/ListAdapter";
|
|
60
|
+
export * from "./@types/ListView";
|
|
61
|
+
export * from "./@types/Matrix";
|
|
62
|
+
export * from "./@types/MotionEvent";
|
|
63
|
+
export * from "./@types/MouseCursor";
|
|
64
|
+
export * from "./@types/Outline";
|
|
65
|
+
export * from "./@types/Paint";
|
|
66
|
+
export * from "./@types/Path";
|
|
67
|
+
export * from "./@types/PathEffect";
|
|
68
|
+
export * from "./@types/Picture";
|
|
69
|
+
export * from "./@types/PictureDrawable";
|
|
70
|
+
export * from "./@types/PixelFormat";
|
|
71
|
+
export * from "./@types/PopupWindow";
|
|
72
|
+
export * from "./@types/PropertyValuesHolder";
|
|
73
|
+
export * from "./@types/Rect";
|
|
74
|
+
export * from "./@types/RelativeLayout";
|
|
75
|
+
export * from "./@types/RendererBackend";
|
|
76
|
+
export * from "./@types/Resolver";
|
|
77
|
+
export * from "./@types/Resources";
|
|
78
|
+
export * from "./@types/ResourcesInflater";
|
|
79
|
+
export * from "./@types/RotateAnimation";
|
|
80
|
+
export * from "./@types/ScaleAnimation";
|
|
81
|
+
export * from "./@types/ScrollView";
|
|
82
|
+
export * from "./@types/Shader";
|
|
83
|
+
export * from "./@types/Shadow";
|
|
84
|
+
export * from "./@types/Slot";
|
|
85
|
+
export * from "./@types/Surface";
|
|
86
|
+
export * from "./@types/SurfaceProvider";
|
|
87
|
+
export * from "./@types/TabBarLayout";
|
|
88
|
+
export * from "./@types/TableLayout";
|
|
89
|
+
export * from "./@types/TableRow";
|
|
90
|
+
export * from "./@types/TextView";
|
|
91
|
+
export * from "./@types/Theme";
|
|
92
|
+
export * from "./@types/TimeInterpolator";
|
|
93
|
+
export * from "./@types/Transformation";
|
|
94
|
+
export * from "./@types/TranslateAnimation";
|
|
95
|
+
export * from "./@types/TypeEvaluator";
|
|
96
|
+
export * from "./@types/Typeface";
|
|
97
|
+
export * from "./@types/TypefaceFactory";
|
|
98
|
+
export * from "./@types/ValueAnimator";
|
|
99
|
+
export * from "./@types/View";
|
|
100
|
+
export * from "./@types/ViewGroup";
|
|
101
|
+
export * from "./@types/ViewGroupOverlay";
|
|
102
|
+
export * from "./@types/ViewOutlineProvider";
|
|
103
|
+
export * from "./@types/ViewOverlay";
|
|
104
|
+
export * from "./@types/ViewParent";
|
|
105
|
+
export * from "./@types/ViewSlot";
|
|
106
|
+
export * from "./@types/ViewTreeObserver";
|
|
107
|
+
export * from "./@types/Window";
|
|
108
|
+
export * from "./@types/WindowManager";
|
|
109
|
+
export * from "./@types/XMLLayoutParser";
|
|
110
|
+
export * from "./@types/XMLResourcesParser";
|
|
111
|
+
export * from "./@types/XMLViewFactoryRegistry";
|