RefreshConstants.ets
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* The constant of refresh.
*/
export class RefreshConstants {
/**
* The off set coefficient.
*/
static readonly Y_OFF_SET_COEFFICIENT: number = 0.1;
/**
* The animation delay time.
*/
static readonly DELAY_ANIMATION_DURATION: number = 300;
/**
* The delay time.
*/
static readonly DELAY_TIME: number = 200;
/**
* The animation duration.
*/
static readonly ANIMATION_DURATION: number = 200;
/**
* The RefreshConstant constants.
*/
static readonly RefreshConstant_DELAY_PULL_DOWN_REFRESH: number = 50;
static readonly RefreshConstant_CLOSE_PULL_DOWN_REFRESH_TIME: number = 150;
static readonly RefreshConstant_DELAY_SHRINK_ANIMATION_TIME: number = 500;
/**
* The page size.
*/
static readonly PAGE_SIZE: number = 20;
/**
* The refresh and load height.
*/
static readonly CUSTOM_LAYOUT_HEIGHT: number = 70;
/**
* Full the width.
*/
static readonly FULL_WIDTH: string = '100%';
/**
* The NoMoreLayout constants.
*/
static readonly NoMoreLayoutConstant_NORMAL_PADDING: number = 8;
static readonly NoMoreLayoutConstant_TITLE_FONT: string = '16fp';
/**
* The RefreshLayout constants.
*/
static readonly RefreshLayout_MARGIN_LEFT: string = '40%';
static readonly RefreshLayout_TEXT_MARGIN_BOTTOM: number = 1;
static readonly RefreshLayout_TEXT_MARGIN_LEFT: number = 7;
static readonly RefreshLayout_TEXT_FONT_SIZE: number = 17;
static readonly RefreshLayout_IMAGE_WIDTH: number = 18;
static readonly RefreshLayout_IMAGE_HEIGHT: number = 18;
}
/**
* The refresh state enum.
*/
export const enum RefreshState {
DropDown = 0,
Release = 1,
Refreshing = 2,
Success = 3,
Fail = 4
}