enrecipes/app/rtl-ui/label/index.android.ts

14 lines
328 B
TypeScript
Raw Normal View History

2021-06-15 11:04:42 +00:00
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
)
}
}