@@ -40,7 +40,7 @@ function initializeTextTransformation(): void {
4040 // NOTE: Do we need to transform the new text here?
4141 const formattedText = this . textBase . formattedText ;
4242 if ( formattedText ) {
43- return createSpannableStringBuilder ( formattedText , ( < android . widget . TextView > view ) . getTextSize ( ) ) ;
43+ return this . textBase . createFormattedTextNative ( formattedText ) ;
4444 } else {
4545 const text = this . textBase . text ;
4646 const stringValue = isNullOrUndefined ( text ) ? '' : text . toString ( ) ;
@@ -233,7 +233,9 @@ export class TextBase extends TextBaseCommon {
233233
234234 this . _setNativeText ( reset ) ;
235235 }
236-
236+ createFormattedTextNative ( value : FormattedString ) {
237+ return createSpannableStringBuilder ( value , this . style . fontSize ) ;
238+ }
237239 [ formattedTextProperty . setNative ] ( value : FormattedString ) {
238240 const nativeView = this . nativeTextViewProtected ;
239241 if ( ! value ) {
@@ -247,7 +249,7 @@ export class TextBase extends TextBaseCommon {
247249 return ;
248250 }
249251
250- const spannableStringBuilder = createSpannableStringBuilder ( value , this . style . fontSize ) ;
252+ const spannableStringBuilder = this . createFormattedTextNative ( value ) ;
251253 nativeView . setText ( < any > spannableStringBuilder ) ;
252254 this . _setTappableState ( isStringTappable ( value ) ) ;
253255
@@ -443,7 +445,7 @@ export class TextBase extends TextBaseCommon {
443445
444446 let transformedText : any ;
445447 if ( this . formattedText ) {
446- transformedText = createSpannableStringBuilder ( this . formattedText , this . style . fontSize ) ;
448+ transformedText = this . createFormattedTextNative ( this . formattedText ) ;
447449 } else {
448450 const text = this . text ;
449451 const stringValue = text === null || text === undefined ? '' : text . toString ( ) ;
0 commit comments