From d249170335daf0db93e659185910c4b126a1ad4e Mon Sep 17 00:00:00 2001 From: logikgate Date: Fri, 27 Dec 2019 11:22:07 -0500 Subject: [PATCH] fix(android-label): Match iOS default vertical alignment Set gravity to CENTER_VERTICAL on android to match iOS labels which default to vertically centered Fixes issue #3829 --- nativescript-core/ui/label/label.android.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/nativescript-core/ui/label/label.android.ts b/nativescript-core/ui/label/label.android.ts index 18af5c9a24..be45a65b93 100644 --- a/nativescript-core/ui/label/label.android.ts +++ b/nativescript-core/ui/label/label.android.ts @@ -36,6 +36,7 @@ export class Label extends TextBase implements LabelDefinition { const textView = this.nativeTextViewProtected; textView.setSingleLine(true); textView.setEllipsize(android.text.TextUtils.TruncateAt.END); + textView.setGravity(android.view.Gravity.CENTER_VERTICAL); } [whiteSpaceProperty.setNative](value: WhiteSpace) {