mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
Fix: All formatted string appear with commas between each letter
This commit is contained in:
@ -236,10 +236,9 @@ class TextTransformation extends android.text.method.ReplacementTransformationMe
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected getReplacement(): native.Array<string> {
|
private _getTransformedString(): string {
|
||||||
let stringResult: string = "";
|
let stringResult: string = "";
|
||||||
let result: native.Array<string> = [];
|
let textTransform = this.textTransform;
|
||||||
let textTransform = this.textTransform
|
|
||||||
if (this.formattedText) {
|
if (this.formattedText) {
|
||||||
for (let i = 0, length = this.formattedText.spans.length; i < length; i++) {
|
for (let i = 0, length = this.formattedText.spans.length; i < length; i++) {
|
||||||
let span = this.formattedText.spans.getItem(i);
|
let span = this.formattedText.spans.getItem(i);
|
||||||
@ -249,16 +248,20 @@ class TextTransformation extends android.text.method.ReplacementTransformationMe
|
|||||||
else {
|
else {
|
||||||
stringResult = getTransformedText(this.originalText, textTransform);
|
stringResult = getTransformedText(this.originalText, textTransform);
|
||||||
}
|
}
|
||||||
|
return stringResult;
|
||||||
for(let j = 0, loopLength = stringResult.length; j < loopLength; j++) {
|
|
||||||
result[j] = stringResult.charAt(j);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected getReplacement(): native.Array<string> {
|
||||||
|
let transformedString = this._getTransformedString();
|
||||||
|
let result: native.Array<string> = [];
|
||||||
|
for(let i = 0, length = transformedString.length; i < length; i++) {
|
||||||
|
result[i] = transformedString.charAt(i);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTransformation(charSeq: string, view: android.view.View): string {
|
public getTransformation(charSeq: string, view: android.view.View): string {
|
||||||
return this.getReplacement().toString();
|
return this._getTransformedString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user