Android Label not auto resizing after value change



Dear reader,

I’ve created an issue topic on github about the bug that Label introduces for Android.
Please checkout my topic and hope we can solve this issue.

Kind regards,



Looks like a platform parity issue, you may fix it by simply calling .requestLayout() on textChange event of label.


Hallo Manojdcoder, cheers for your reply, I’m gonna test it out and come back to you with results. :slight_smile:


That bug is very annoying.

If you’re using nativescript-angular, you can use this directive to workaround the problem.

import { Directive, ElementRef, Input } from '@angular/core';
import { Label } from 'tns-core-modules/ui/label';

 * Make sure the layout is updated then the Label's text is changed.
  // tslint:disable-next-line:directive-selector
  selector: 'Label[text]',
export class UpdateLabelDirective {
  public set _text(text: string) {
    const nativeView = this.nativeView;
    if (nativeView && nativeView instanceof Label) {
      nativeView.text = text;

  private get nativeView(): Label {
    return this.el.nativeElement;

  constructor(private readonly el: ElementRef) {}