mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 18:12:09 +08:00
fix(android): use nativeTextViewProtected
internally (#9483)
This commit is contained in:

committed by
Nathan Walker

parent
e00f9772d8
commit
0d0d0382ad
@ -345,10 +345,10 @@ export class TextBase extends TextBaseCommon {
|
||||
}
|
||||
|
||||
[lineHeightProperty.getDefault](): number {
|
||||
return this.nativeView.getLineSpacingExtra() / layout.getDisplayDensity();
|
||||
return this.nativeTextViewProtected.getLineSpacingExtra() / layout.getDisplayDensity();
|
||||
}
|
||||
[lineHeightProperty.setNative](value: number) {
|
||||
this.nativeView.setLineSpacing(value * layout.getDisplayDensity(), 1);
|
||||
this.nativeTextViewProtected.setLineSpacing(value * layout.getDisplayDensity(), 1);
|
||||
}
|
||||
|
||||
[fontInternalProperty.getDefault](): android.graphics.Typeface {
|
||||
@ -395,7 +395,7 @@ export class TextBase extends TextBaseCommon {
|
||||
|
||||
[textShadowProperty.setNative](value: CSSShadow) {
|
||||
// prettier-ignore
|
||||
this.nativeViewProtected.setShadowLayer(
|
||||
this.nativeTextViewProtected.setShadowLayer(
|
||||
Length.toDevicePixels(value.blurRadius, java.lang.Float.MIN_VALUE),
|
||||
Length.toDevicePixels(value.offsetX, 0),
|
||||
Length.toDevicePixels(value.offsetY, 0),
|
||||
@ -471,10 +471,10 @@ export class TextBase extends TextBaseCommon {
|
||||
if (this._tappable !== tappable) {
|
||||
this._tappable = tappable;
|
||||
if (this._tappable) {
|
||||
this.nativeViewProtected.setMovementMethod(android.text.method.LinkMovementMethod.getInstance());
|
||||
this.nativeViewProtected.setHighlightColor(null);
|
||||
this.nativeTextViewProtected.setMovementMethod(android.text.method.LinkMovementMethod.getInstance());
|
||||
this.nativeTextViewProtected.setHighlightColor(null);
|
||||
} else {
|
||||
this.nativeViewProtected.setMovementMethod(this._defaultMovementMethod);
|
||||
this.nativeTextViewProtected.setMovementMethod(this._defaultMovementMethod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user