Hello everyone.
How can I replicate the behavior of the Gmail app’s email input field for Arabic locales using Compose’s TextField?
I’ve experimented with various combinations of TextDirection, but I can’t achieve the desired effect. The cursor doesn’t always appear where I expect it to be, and symbols like @ or ! are displayed on the left side of English text when they are the last characters.
This is what I plan to use when LayoutDirection is RTL for all email, password, phone and similar input fields with predominately english text.
Arabic localisation is already confusing, there is definitely a room for improvement from the framework side
z
Zach Klippenstein (he/him) [MOD]
01/21/2025, 3:03 PM
If you want the framework to improve, please file this as a bug
s
Skaldebane
02/05/2025, 1:25 AM
I think this is expected behavior, not sure what else could Compose do here. Respecting the layout direction is the correct thing to do in most cases, and you opt-out when you don't want to.