@@ -13,7 +13,23 @@ import {
13
13
strokeDisabledColorProperty ,
14
14
strokeInactiveColorProperty
15
15
} from '@nativescript-community/ui-material-core/textbase/cssproperties' ;
16
- import { Background , Color , Font , Utils , backgroundInternalProperty , borderBottomLeftRadiusProperty , fontInternalProperty , hintProperty , placeholderColorProperty , profile } from '@nativescript/core' ;
16
+ import {
17
+ Background ,
18
+ Color ,
19
+ Font ,
20
+ Length ,
21
+ Utils ,
22
+ backgroundInternalProperty ,
23
+ borderBottomLeftRadiusProperty ,
24
+ fontInternalProperty ,
25
+ hintProperty ,
26
+ paddingBottomProperty ,
27
+ paddingLeftProperty ,
28
+ paddingRightProperty ,
29
+ paddingTopProperty ,
30
+ placeholderColorProperty ,
31
+ profile
32
+ } from '@nativescript/core' ;
17
33
import { secureProperty } from '@nativescript/core/ui/text-field' ;
18
34
import { TextFieldBase } from './textfield.common' ;
19
35
@@ -41,11 +57,13 @@ export class TextField extends TextFieldBase {
41
57
constructor ( ) {
42
58
super ( ) ;
43
59
}
60
+ // @ts -ignore
44
61
get nativeTextViewProtected ( ) {
45
62
return this . editText ;
46
63
}
47
64
48
65
drawingBackground = false ;
66
+ // @ts -ignore
49
67
get nativeViewProtected ( ) {
50
68
return this . layoutView ;
51
69
}
@@ -288,5 +306,17 @@ export class TextField extends TextFieldBase {
288
306
this . nativeViewProtected . setTypeface ( value instanceof Font ? value . getAndroidTypeface ( ) : value ) ;
289
307
}
290
308
}
309
+ [ paddingTopProperty . setNative ] ( value : Length ) {
310
+ org . nativescript . widgets . ViewHelper . setPaddingTop ( this . nativeViewProtected , Length . toDevicePixels ( value , 0 ) + Length . toDevicePixels ( this . style . borderTopWidth , 0 ) ) ;
311
+ }
312
+ [ paddingRightProperty . setNative ] ( value : Length ) {
313
+ org . nativescript . widgets . ViewHelper . setPaddingRight ( this . nativeViewProtected , Length . toDevicePixels ( value , 0 ) + Length . toDevicePixels ( this . style . borderRightWidth , 0 ) ) ;
314
+ }
315
+ [ paddingBottomProperty . setNative ] ( value : Length ) {
316
+ org . nativescript . widgets . ViewHelper . setPaddingBottom ( this . nativeViewProtected , Length . toDevicePixels ( value , 0 ) + Length . toDevicePixels ( this . style . borderBottomWidth , 0 ) ) ;
317
+ }
318
+ [ paddingLeftProperty . setNative ] ( value : Length ) {
319
+ org . nativescript . widgets . ViewHelper . setPaddingLeft ( this . nativeViewProtected , Length . toDevicePixels ( value , 0 ) + Length . toDevicePixels ( this . style . borderLeftWidth , 0 ) ) ;
320
+ }
291
321
}
292
322
//
0 commit comments