Nathan Walker
2023-10-09 12:00:21 -07:00
committed by GitHub
parent 93e24783a1
commit d6478237ec
18 changed files with 230 additions and 76 deletions

View File

@ -7,12 +7,10 @@ import { CoreTypes } from '../../core-types';
export * from '../text-base';
let TextView: typeof android.widget.TextView;
@CSSType('Label')
export class Label extends TextBase implements LabelDefinition {
nativeViewProtected: android.widget.TextView;
nativeTextViewProtected: android.widget.TextView;
nativeViewProtected: org.nativescript.widgets.StyleableTextView;
nativeTextViewProtected: org.nativescript.widgets.StyleableTextView;
get textWrap(): boolean {
return this.style.whiteSpace === 'normal';
@ -27,11 +25,7 @@ export class Label extends TextBase implements LabelDefinition {
@profile
public createNativeView() {
if (!TextView) {
TextView = android.widget.TextView;
}
return new TextView(this._context);
return new org.nativescript.widgets.StyleableTextView(this._context);
}
public initNativeView(): void {