Width of an element in layout

How do I get a width of an element like label, textarea when I do findDrawableById? It just seems like there's no properties like that at all for those elements Disappointed

  • Any element that's returned by findDrawableById should inherit from Drawable. (findDrawableById literally returns a Drawable or null)

    You should be able to use the width property of Drawable in this case.

    e.g.

    var label1 = findDrawableById("label1");
    System.println("label1.width = " + label1.width);