Skip to content

Slashes with text ellipsis overflow behaves differently than Android (Desktop) #1888

Closed
JetBrains/compose-multiplatform-core
#899
@JetpackDuba

Description

@JetpackDuba

When I have got a Text with slashes (like a file path) as text that doesn't fit the current screen, in the Android version of compose the string gets cut partially and not the whole word. The Desktop version cuts the whole word instead until the slash.

Desktop: "FooBar" is not shown, just the ellipsis.

Desktop
ellipsis

Android: "Foo" is shown + Ellipsis

Android

Code sample:

MaterialTheme {
    Text(
        text = "/Path/To/A/Fantastic/Path/Named/FooBar",
        overflow = TextOverflow.Ellipsis,
        fontSize = 23.sp,
        maxLines = 1,
    )
}

TextOverflow.Clip behaves in equally in both platform by cutting the whole word.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingskiatext

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions