File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
plugin/platforms/android/java/com/nativescript/label Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
package com .nativescript .label ;
2
2
3
+ import java .lang .CharSequence ;
3
4
import androidx .appcompat .widget .AppCompatTextView ;
4
5
import com .nativescript .text .TextView ;
5
6
import android .content .Context ;
@@ -43,6 +44,17 @@ public void setMaxLines (int maxLines) {
43
44
super .setMaxLines (maxLines );
44
45
}
45
46
47
+ @ Override
48
+ public void setTextColor (int color ) {
49
+ super .setTextColor (color );
50
+ }
51
+ public void setLabelText (String text ) {
52
+ super .setText (text );
53
+ }
54
+ public void setLabelText (CharSequence text ) {
55
+ super .setText (text );
56
+ }
57
+
46
58
@ Override
47
59
public void setTextIsSelectable (boolean value ) {
48
60
super .setTextIsSelectable (value );
Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ export class Label extends LabelBase {
439
439
return ;
440
440
}
441
441
if ( reset ) {
442
- this . nativeTextViewProtected . setText ( null ) ;
442
+ this . nativeTextViewProtected . setLabelText ( null ) ;
443
443
return ;
444
444
}
445
445
let transformedText : any = null ;
@@ -459,7 +459,7 @@ export class Label extends LabelBase {
459
459
const stringValue = text === null || text === undefined ? '' : text . toString ( ) ;
460
460
transformedText = getTransformedText ( stringValue , this . textTransform ) ;
461
461
}
462
- this . nativeTextViewProtected . setText ( transformedText ) ;
462
+ this . nativeTextViewProtected . setLabelText ( transformedText ) ;
463
463
}
464
464
}
465
465
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ declare namespace com {
15
15
enableAutoSize ( minFontSize : number , maxFontSize : number , step : number ) ;
16
16
disableAutoSize ( ) ;
17
17
setTappableState ( value : boolean ) ;
18
+ setLabelText ( value : string | java . lang . CharSequence ) ;
18
19
}
19
20
}
20
21
}
You can’t perform that action at this time.
0 commit comments