With RTL, does automirror work for vector drawable...
# compose
a
With RTL, does automirror work for vector drawables being painted in compose? I’m not seeing it forcing a config change on device, or using the LocalLayoutDirection local
a
I don’t think there is auto mirroring but you can easily create a modifier like this:
Copy code
fun Modifier.mirrorIfNeeded(): Modifier = composed {
    if (LocalLayoutDirection.current == LayoutDirection.Ltr)
        Modifier else Modifier.scale(-1f, 1f)
}
🎉 2
a
I guess the thing is, I'd want to rely on the automirrored vector drawable property
c
@Nader Jawad is there an existing request for this already?
n
Literally just submitted support for this like 15 mins ago
So short answer is not yet but soon
🎉 1
In the meantime what Albert has suggested above will work.
a
@Nader Jawad you have no idea how tempted I was to fork it today and draft up a quick solution 😂
😂 2
Looks like what I had in my head more or less matches what you were thinking too 🙂
👍 1