Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add maxLines Property to Label #8485

Copy link
Copy link
Open
@wendt88

Description

@wendt88
Issue body actions

Is your feature request related to a problem? Please describe.
It would be nice to add maxLines property to the Label view. It could be done with a angular/vue directive, but it's always buggy, especially inside a ListView

Describe the solution you'd like

if (view.android) {
        view.android.setSingleLine(false);
        view.android.setMaxLines(maxLines);
        view.android.setEllipsize(android.text.TextUtils.TruncateAt.END);
}
else if (view.ios) {
        viewl.ios.numberOfLines = maxLines;
        view.ios.adjustsFontSizeToFitWidth = false;
        view.ios.lineBreakMode = NSLineBreakMode.ByTruncatingTail;
}

Additional context
Inside a ListView the View gets initialized without native element. so the properties above must be set later. And that does not updates the View.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.