material-components-ios icon indicating copy to clipboard operation
material-components-ios copied to clipboard

[MDCTextField] in RTL alignment misleading

Open BasantAshraf opened this issue 5 years ago • 5 comments

Iam facing alignment problem for placeholder of MDCTextField when changing from LTR to RTL

any clue to fix that ??

when start editing the textField, the alignment is fixed, but initial state has that problem

Screen Shot 2019-12-20 at 11 11 13 PM

Internal data

BasantAshraf avatar Dec 20 '19 21:12 BasantAshraf

The title doesn't have a [Component] prefix.

We just released a new possible replacement for MDCTextFields living under the "TextControls" component. One of the textfields, the MDCOutlinedTextField, looks like it would meet your needs. Would you be interested in trying it and seeing if it has the same issue?

andrewoverton avatar Dec 23 '19 19:12 andrewoverton

@andrewoverton i fixed the RTL problem using

    semanticContentAttribute = Language.isArabic() ? .forceRightToLeft : .forceLeftToRight

but i have another problem, the limitation to change corner radius to a value of 12 instead of the default constant 4 set by the library does the new component have access to change the cornerRadius property ?

BasantAshraf avatar Dec 23 '19 19:12 BasantAshraf

The new textfield does not currently expose a means of setting corner radius on the outline.

andrewoverton avatar Dec 26 '19 14:12 andrewoverton

+1. Facing the same issue on MDCOutlinedTextField. Alignment is RTL when the textfield is loaded in the view but as soon as the editing begins, the alignment changes to LTR. (The leading view appears in the correct place though)

Screenshot 2022-04-21 at 3 43 03 PM Screenshot 2022-04-21 at 3 42 00 PM Screenshot 2022-04-21 at 3 42 36 PM

pramittewari avatar Apr 21 '22 10:04 pramittewari