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

Label width doesn't change when content changes #1450

Copy link
Copy link
Open
@tsonevn

Description

@tsonevn
Issue body actions

From @erkanarslan on July 23, 2018 12:48

Did you verify this is a real problem by searching the [NativeScript Forum]

Yes

Tell us about the problem

On iOS a label element inside a flexbox-layout element isn't resized when its content changed. In this case if new content is longer than the previous one, text is shortened with ellipsis. However, there is no problem in Android in this case.

If I put the label element inside a stack-layout element, it isn't resized in Android but resized in iOS.

I am tested only the width change here. I didn't test height change. Both flexbox-layout and stack-layout has horizontal orientation.

I have to use stack-layout for iOS and flexbox-layout for Android to solve this problem.

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.1.2
  • Cross-platform modules: 4.1.0
  • Runtime(s): 4.1.1 for iOS and 4.1.3 for Android
  • Plugin(s): unrelated

Please tell us how to recreate the issue in as much detail as possible.

Create a stack-layout in horizontal orientation. Put a few labels in it. Set the content of one of the labels to something longer. It works on ios but not on android.

Do the same but this time use flexbox-layout. It works on android but not on ios.

Copied from original issue: NativeScript/NativeScript#6109

Metadata

Metadata

Assignees

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.