mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00

* fix padding on text-view & text-field text-base is now snapshotable view.android is now snapshotable * createNativeView returns the nativeView for android Fix image tests Implement test for image loaded from res:// EffectivePaddings updated when nativeView have some from its native theme
24 lines
704 B
TypeScript
24 lines
704 B
TypeScript
import { Label as LabelDefinition } from "ui/label";
|
|
import { TextBase, WhiteSpace } from "ui/text-base";
|
|
|
|
export * from "ui/text-base";
|
|
|
|
export class Label extends TextBase implements LabelDefinition {
|
|
private _android: android.widget.TextView;
|
|
|
|
get textWrap(): boolean {
|
|
return this.style.whiteSpace === WhiteSpace.NORMAL;
|
|
}
|
|
set textWrap(value: boolean) {
|
|
this.style.whiteSpace = value ? WhiteSpace.NORMAL : WhiteSpace.NO_WRAP;
|
|
}
|
|
|
|
get android(): android.widget.TextView {
|
|
return this._android;
|
|
}
|
|
|
|
public _createNativeView() {
|
|
const textView = this._android = new android.widget.TextView(this._context);
|
|
return textView;
|
|
}
|
|
} |