|
1 | 1 | import { VerticalTextAlignment } from '@nativescript-community/text'; |
2 | | -import { Application, Color, Utils, ViewBase, profile, CoreTypes } from '@nativescript/core'; |
| 2 | +import { Application, Color, CoreTypes, Utils, ViewBase, profile } from '@nativescript/core'; |
3 | 3 |
|
4 | 4 | let isPostLollipopVar: boolean; |
5 | 5 | export function isPostLollipop() { |
@@ -55,94 +55,94 @@ function createNativeArray(...args) { |
55 | 55 | } |
56 | 56 | export const stateSets = { |
57 | 57 | get PRESSED_STATE_SET() { |
58 | | - if (!this._PRESSED_STATE_SET) { |
59 | | - this._PRESSED_STATE_SET = createNativeArray(state.pressed); |
| 58 | + if (!this.mPRESSED_STATE_SET) { |
| 59 | + this.mPRESSED_STATE_SET = createNativeArray(state.pressed); |
60 | 60 | } |
61 | | - return this._PRESSED_STATE_SET as Array<number>; |
| 61 | + return this.mPRESSED_STATE_SET as number[]; |
62 | 62 | }, |
63 | 63 | get HOVERED_FOCUSED_STATE_SET() { |
64 | | - if (!this._HOVERED_FOCUSED_STATE_SET) { |
65 | | - this._HOVERED_FOCUSED_STATE_SET = createNativeArray(state.hovered, state.focused); |
| 64 | + if (!this.mHOVERED_FOCUSED_STATE_SET) { |
| 65 | + this.mHOVERED_FOCUSED_STATE_SET = createNativeArray(state.hovered, state.focused); |
66 | 66 | } |
67 | | - return this._PRESSED_STATE_SET as Array<number>; |
| 67 | + return this.mPRESSED_STATE_SET as number[]; |
68 | 68 | }, |
69 | 69 | get FOCUSED_STATE_SET() { |
70 | | - if (!this._FOCUSED_STATE_SET) { |
71 | | - this._FOCUSED_STATE_SET = createNativeArray(state.focused); |
| 70 | + if (!this.mFOCUSED_STATE_SET) { |
| 71 | + this.mFOCUSED_STATE_SET = createNativeArray(state.focused); |
72 | 72 | } |
73 | | - return this._FOCUSED_STATE_SET as Array<number>; |
| 73 | + return this.mFOCUSED_STATE_SET as number[]; |
74 | 74 | }, |
75 | 75 | get HOVERED_STATE_SET() { |
76 | | - if (!this._HOVERED_STATE_SET) { |
77 | | - this._HOVERED_STATE_SET = createNativeArray(state.hovered); |
| 76 | + if (!this.mHOVERED_STATE_SET) { |
| 77 | + this.mHOVERED_STATE_SET = createNativeArray(state.hovered); |
78 | 78 | } |
79 | | - return this._HOVERED_STATE_SET as Array<number>; |
| 79 | + return this.mHOVERED_STATE_SET as number[]; |
80 | 80 | }, |
81 | 81 | get SELECTED_PRESSED_STATE_SET() { |
82 | | - if (!this._SELECTED_PRESSED_STATE_SET) { |
83 | | - this._SELECTED_PRESSED_STATE_SET = createNativeArray(state.enabled, state.pressed); |
| 82 | + if (!this.mSELECTED_PRESSED_STATE_SET) { |
| 83 | + this.mSELECTED_PRESSED_STATE_SET = createNativeArray(state.enabled, state.pressed); |
84 | 84 | } |
85 | | - return this._SELECTED_PRESSED_STATE_SET as Array<number>; |
| 85 | + return this.mSELECTED_PRESSED_STATE_SET as number[]; |
86 | 86 | }, |
87 | 87 | get SELECTED_HOVERED_FOCUSED_STATE_SET() { |
88 | | - if (!this._SELECTED_HOVERED_FOCUSED_STATE_SET) { |
89 | | - this._SELECTED_HOVERED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.hovered, state.focused); |
| 88 | + if (!this.mSELECTED_HOVERED_FOCUSED_STATE_SET) { |
| 89 | + this.mSELECTED_HOVERED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.hovered, state.focused); |
90 | 90 | } |
91 | | - return this._SELECTED_HOVERED_FOCUSED_STATE_SET as Array<number>; |
| 91 | + return this.mSELECTED_HOVERED_FOCUSED_STATE_SET as number[]; |
92 | 92 | }, |
93 | 93 | get SELECTED_FOCUSED_STATE_SET() { |
94 | | - if (!this._SELECTED_FOCUSED_STATE_SET) { |
95 | | - this._SELECTED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.focused); |
| 94 | + if (!this.mSELECTED_FOCUSED_STATE_SET) { |
| 95 | + this.mSELECTED_FOCUSED_STATE_SET = createNativeArray(state.selected, state.focused); |
96 | 96 | } |
97 | | - return this._SELECTED_FOCUSED_STATE_SET as Array<number>; |
| 97 | + return this.mSELECTED_FOCUSED_STATE_SET as number[]; |
98 | 98 | }, |
99 | 99 | get SELECTED_HOVERED_STATE_SET() { |
100 | | - if (!this._SELECTED_HOVERED_STATE_SET) { |
101 | | - this._SELECTED_HOVERED_STATE_SET = createNativeArray(state.selected, state.hovered); |
| 100 | + if (!this.mSELECTED_HOVERED_STATE_SET) { |
| 101 | + this.mSELECTED_HOVERED_STATE_SET = createNativeArray(state.selected, state.hovered); |
102 | 102 | } |
103 | | - return this._SELECTED_HOVERED_STATE_SET as Array<number>; |
| 103 | + return this.mSELECTED_HOVERED_STATE_SET as number[]; |
104 | 104 | }, |
105 | 105 | get SELECTED_STATE_SET() { |
106 | | - if (!this._SELECTED_STATE_SET) { |
107 | | - this._SELECTED_STATE_SET = createNativeArray(state.selected); |
| 106 | + if (!this.mSELECTED_STATE_SET) { |
| 107 | + this.mSELECTED_STATE_SET = createNativeArray(state.selected); |
108 | 108 | } |
109 | | - return this._SELECTED_STATE_SET as Array<number>; |
| 109 | + return this.mSELECTED_STATE_SET as number[]; |
110 | 110 | }, |
111 | 111 | get BACKGROUND_DEFAULT_STATE_1() { |
112 | | - if (!this._BACKGROUND_DEFAULT_STATE_1) { |
113 | | - this._BACKGROUND_DEFAULT_STATE_1 = createNativeArray(state.window_focused, state.enabled); |
| 112 | + if (!this.mBACKGROUND_DEFAULT_STATE_1) { |
| 113 | + this.mBACKGROUND_DEFAULT_STATE_1 = createNativeArray(state.window_focused, state.enabled); |
114 | 114 | } |
115 | | - return this._BACKGROUND_DEFAULT_STATE_1 as number[]; |
| 115 | + return this.mBACKGROUND_DEFAULT_STATE_1 as number[]; |
116 | 116 | }, |
117 | 117 | get BACKGROUND_DEFAULT_STATE_2() { |
118 | | - if (!this._BACKGROUND_DEFAULT_STATE_1_SET) { |
119 | | - this._BACKGROUND_DEFAULT_STATE_1_SET = createNativeArray(state.enabled); |
| 118 | + if (!this.mBACKGROUND_DEFAULT_STATE_1_SET) { |
| 119 | + this.mBACKGROUND_DEFAULT_STATE_1_SET = createNativeArray(state.enabled); |
120 | 120 | } |
121 | | - return this._BACKGROUND_DEFAULT_STATE_1_SET as Array<number>; |
| 121 | + return this.mBACKGROUND_DEFAULT_STATE_1_SET as number[]; |
122 | 122 | }, |
123 | 123 | get BACKGROUND_SELECTED_STATE() { |
124 | | - if (!this._BACKGROUND_SELECTED_STATE) { |
125 | | - this._BACKGROUND_SELECTED_STATE = createNativeArray(state.window_focused, state.enabled, state.pressed); |
| 124 | + if (!this.mBACKGROUND_SELECTED_STATE) { |
| 125 | + this.mBACKGROUND_SELECTED_STATE = createNativeArray(state.window_focused, state.enabled, state.pressed); |
126 | 126 | } |
127 | | - return this._BACKGROUND_SELECTED_STATE as Array<number>; |
| 127 | + return this.mBACKGROUND_SELECTED_STATE as number[]; |
128 | 128 | }, |
129 | 129 | get BACKGROUND_CHECKED_STATE() { |
130 | | - if (!this._BACKGROUND_CHECKED_STATE) { |
131 | | - this._BACKGROUND_CHECKED_STATE = createNativeArray(state.window_focused, state.enabled, state.checked); |
| 130 | + if (!this.mBACKGROUND_CHECKED_STATE) { |
| 131 | + this.mBACKGROUND_CHECKED_STATE = createNativeArray(state.window_focused, state.enabled, state.checked); |
132 | 132 | } |
133 | | - return this._BACKGROUND_CHECKED_STATE as Array<number>; |
| 133 | + return this.mBACKGROUND_CHECKED_STATE as number[]; |
134 | 134 | }, |
135 | 135 | get BACKGROUND_FOCUSED_STATE() { |
136 | | - if (!this._BACKGROUND_FOCUSED_STATE) { |
137 | | - this._BACKGROUND_FOCUSED_STATE = createNativeArray(state.focused, state.window_focused, state.enabled); |
| 136 | + if (!this.mBACKGROUND_FOCUSED_STATE) { |
| 137 | + this.mBACKGROUND_FOCUSED_STATE = createNativeArray(state.focused, state.window_focused, state.enabled); |
138 | 138 | } |
139 | | - return this._BACKGROUND_FOCUSED_STATE as Array<number>; |
| 139 | + return this.mBACKGROUND_FOCUSED_STATE as number[]; |
140 | 140 | }, |
141 | 141 | get BACKGROUND_DISABLED_STATE() { |
142 | | - if (!this._BACKGROUND_DISABLED_STATE) { |
143 | | - this._BACKGROUND_DISABLED_STATE = createNativeArray(-state.enabled); |
| 142 | + if (!this.mBACKGROUND_DISABLED_STATE) { |
| 143 | + this.mBACKGROUND_DISABLED_STATE = createNativeArray(-state.enabled); |
144 | 144 | } |
145 | | - return this._BACKGROUND_DISABLED_STATE as Array<number>; |
| 145 | + return this.mBACKGROUND_DISABLED_STATE as number[]; |
146 | 146 | } |
147 | 147 | }; |
148 | 148 |
|
|
0 commit comments