@@ -66,18 +66,18 @@ class NativeGridLayout extends org.nativescript.widgets.GridLayout {
6666}
6767
6868export class MyButton extends Button implements def . MyButton {
69- nativeView : NativeButton ;
69+ nativeViewProtected : NativeButton ;
7070
7171 public createNativeView ( ) {
7272 return new NativeButton ( this . _context , this ) ;
7373 }
7474
7575 public initNativeView ( ) : void {
76- this . nativeView . owner = this ;
76+ this . nativeViewProtected . owner = this ;
7777 }
7878
7979 public disposeNativeView ( ) {
80- this . nativeView . owner = undefined ;
80+ this . nativeViewProtected . owner = undefined ;
8181 }
8282
8383 public measureCount : number = 0 ;
@@ -102,35 +102,35 @@ export class MyButton extends Button implements def.MyButton {
102102 }
103103
104104 get layoutWidth ( ) : number {
105- return this . nativeView . getWidth ( ) ;
105+ return this . nativeViewProtected . getWidth ( ) ;
106106 }
107107
108108 get layoutHeight ( ) : number {
109- return this . nativeView . getHeight ( ) ;
109+ return this . nativeViewProtected . getHeight ( ) ;
110110 }
111111
112112 get layoutLeft ( ) : number {
113- return this . nativeView . getLeft ( ) ;
113+ return this . nativeViewProtected . getLeft ( ) ;
114114 }
115115
116116 get layoutTop ( ) : number {
117- return this . nativeView . getTop ( ) ;
117+ return this . nativeViewProtected . getTop ( ) ;
118118 }
119119}
120120
121121export class MyStackLayout extends StackLayout implements def . MyStackLayout {
122- nativeView : NativeStackLayout ;
122+ nativeViewProtected : NativeStackLayout ;
123123
124124 public createNativeView ( ) {
125125 return new NativeStackLayout ( this . _context , this ) ;
126126 }
127127
128128 public initNativeView ( ) : void {
129- this . nativeView . owner = this ;
129+ this . nativeViewProtected . owner = this ;
130130 }
131131
132132 public disposeNativeView ( ) {
133- this . nativeView . owner = undefined ;
133+ this . nativeViewProtected . owner = undefined ;
134134 }
135135
136136 public measureCount : number = 0 ;
@@ -155,35 +155,35 @@ export class MyStackLayout extends StackLayout implements def.MyStackLayout {
155155 }
156156
157157 get layoutWidth ( ) : number {
158- return this . nativeView . getWidth ( ) ;
158+ return this . nativeViewProtected . getWidth ( ) ;
159159 }
160160
161161 get layoutHeight ( ) : number {
162- return this . nativeView . getHeight ( ) ;
162+ return this . nativeViewProtected . getHeight ( ) ;
163163 }
164164
165165 get layoutLeft ( ) : number {
166- return this . nativeView . getLeft ( ) ;
166+ return this . nativeViewProtected . getLeft ( ) ;
167167 }
168168
169169 get layoutTop ( ) : number {
170- return this . nativeView . getTop ( ) ;
170+ return this . nativeViewProtected . getTop ( ) ;
171171 }
172172}
173173
174174export class MyGridLayout extends GridLayout implements def . MyGridLayout {
175- nativeView : NativeGridLayout ;
175+ nativeViewProtected : NativeGridLayout ;
176176
177177 public createNativeView ( ) {
178178 return new NativeGridLayout ( this . _context , this ) ;
179179 }
180180
181181 public initNativeView ( ) : void {
182- this . nativeView . owner = this ;
182+ this . nativeViewProtected . owner = this ;
183183 }
184184
185185 public disposeNativeView ( ) {
186- this . nativeView . owner = undefined ;
186+ this . nativeViewProtected . owner = undefined ;
187187 }
188188
189189 public measureCount : number = 0 ;
@@ -208,19 +208,19 @@ export class MyGridLayout extends GridLayout implements def.MyGridLayout {
208208 }
209209
210210 get layoutWidth ( ) : number {
211- return this . nativeView . getWidth ( ) ;
211+ return this . nativeViewProtected . getWidth ( ) ;
212212 }
213213
214214 get layoutHeight ( ) : number {
215- return this . nativeView . getHeight ( ) ;
215+ return this . nativeViewProtected . getHeight ( ) ;
216216 }
217217
218218 get layoutLeft ( ) : number {
219- return this . nativeView . getLeft ( ) ;
219+ return this . nativeViewProtected . getLeft ( ) ;
220220 }
221221
222222 get layoutTop ( ) : number {
223- return this . nativeView . getTop ( ) ;
223+ return this . nativeViewProtected . getTop ( ) ;
224224 }
225225}
226226
0 commit comments