enrecipes/app/rtl-ui/label/index.android.ts
2021-06-15 16:34:42 +05:30

14 lines
328 B
TypeScript

import { Label, ApplicationSettings } from '@nativescript/core'
export class RLabel extends Label {
public initNativeView(): void {
super.initNativeView()
this._setGravity()
}
private _setGravity(): void {
this.nativeViewProtected.setGravity(
ApplicationSettings.getNumber('RTL', 0) ? 5 : 3
)
}
}