Obsolete
Status Update
Comments
ch...@google.com <ch...@google.com> #2
Already fixed internally. Will be out in v23.
ch...@google.com <ch...@google.com> #3
Released in the v23 support libs
[Deleted User] <[Deleted User]> #4
Hi Chris,
I just tried it with the v23 support library, and it doesn't look like anything changed. It looks exactly the same. Could you point me to where this is fixed?
I just tried it with the v23 support library, and it doesn't look like anything changed. It looks exactly the same. Could you point me to where this is fixed?
ch...@google.com <ch...@google.com> #5
Similar to TextView, the language of the hint has higher priority over the direction than the system layout direction.
If you set an hint in a RTL language then it will be on the right.
If you set an hint in a RTL language then it will be on the right.
[Deleted User] <[Deleted User]> #6
Hi Chris,
It seems that the fix works for activities, but if the login text inputs are inside of a fragment that's on top of another fragment, then the hint text still appears on the left. However, once you tap one of the inputs, all the text suddenly move to be right-aligned. It is very weird.
I've included a video of what happens in the app. Could you please take a look?
It seems that the fix works for activities, but if the login text inputs are inside of a fragment that's on top of another fragment, then the hint text still appears on the left. However, once you tap one of the inputs, all the text suddenly move to be right-aligned. It is very weird.
I've included a video of what happens in the app. Could you please take a look?
[Deleted User] <[Deleted User]> #7
Basically what we did was:
1. Create an empty activity
2. Create a default fragment with a single button that is added by the activity
3. Set default fragment's onclick to add the loginfragment where the text inputs are
Then when the login fragment comes up, the text starts on the left and suddenly appear on the right when tapped. We have the source code of this sample app, but this forum wouldn't let us attach the tar. If you want to see it, let me know and we can find a way to send it to you :)
1. Create an empty activity
2. Create a default fragment with a single button that is added by the activity
3. Set default fragment's onclick to add the loginfragment where the text inputs are
Then when the login fragment comes up, the text starts on the left and suddenly appear on the right when tapped. We have the source code of this sample app, but this forum wouldn't let us attach the tar. If you want to see it, let me know and we can find a way to send it to you :)
ch...@google.com <ch...@google.com> #9
#6 & #7: This is fixed by some layout fixes in the next release.
st...@gmail.com <st...@gmail.com> #10
This seems to still be an issue in Support Libraries v25.0.0:
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:gravity="start"
android:hint="foo">
<EditText
style="?android:textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:imeOptions="flagNoExtractUi"
android:textAlignment="viewStart"
android:gravity="start"
android:maxLines="1" />
</android.support.design.widget.TextInputLayout>
Forcing the layout to right alignment only changes the EditText contents and eyeball password icon, not the hint TextInput hint text.
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="viewStart"
android:gravity="start"
android:hint="foo">
<EditText
style="?android:textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:imeOptions="flagNoExtractUi"
android:textAlignment="viewStart"
android:gravity="start"
android:maxLines="1" />
</android.support.design.widget.TextInputLayout>
Forcing the layout to right alignment only changes the EditText contents and eyeball password icon, not the hint TextInput hint text.
ch...@google.com <ch...@google.com> #11
#9 Working as intended, since your hint is in Roman characters, trying using an Arabic hint.
st...@gmail.com <st...@gmail.com> #12
Thanks for the fast follow up.
We use screenshots tests to detect regressions in our code base. Because no one on the team is fluent in an RTL language (I personally would have hard time telling if a word was even upside down!), we make heavy usage of forcing English to an RTL layout[0]. Can this bug be considered reopened to support this mode of operation? I guess we only have about a half dozen different View component tests so far but this is the first instance we've found of a framework View that didn't support forcing an RTL layout.
Thanks for your time :]
[0] For example:https://gerrit.wikimedia.org/r/#/c/320543/2/app/screenshots-ref/org.wikipedia.descriptions.DescriptionEditViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png,unified
We use screenshots tests to detect regressions in our code base. Because no one on the team is fluent in an RTL language (I personally would have hard time telling if a word was even upside down!), we make heavy usage of forcing English to an RTL layout[0]. Can this bug be considered reopened to support this mode of operation? I guess we only have about a half dozen different View component tests so far but this is the first instance we've found of a framework View that didn't support forcing an RTL layout.
Thanks for your time :]
[0] For example:
ch...@google.com <ch...@google.com> #13
No, it's working as intended.
lu...@gmail.com <lu...@gmail.com> #14
this still isn't fixed. latest androidx
ch...@google.com <ch...@google.com>
ma...@gmail.com <ma...@gmail.com> #15
I am experiencing problems with this, as well. The hint is in a RTL language, yet it's on the left side of my screen.
[Deleted User] <[Deleted User]> #16
If anyone is still having this issue I found a solution that worked for me:
android:textAlignment="viewStart"
I added this one line to the TextInputEditText and it worked just fine
android:textAlignment="viewStart"
I added this one line to the TextInputEditText and it worked just fine
Description
Version used: 22.2.1
Theme used: Theme.AppCompat.Light.NoActionBar
Devices/Android versions reproduced on: Nexus 5, Version 4.4.2
When I wrap my EditText in a TextInputLayout, the hint no longer supports RTL.
Here is my xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:hint="Foo"
android:textAlignment="viewStart"/>
</android.support.design.widget.TextInputLayout>
<EditText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
android:hint="Foo"
android:textAlignment="viewStart"/>
</LinearLayout>
I've attached screenshots for what it looks like on my device
(FYI, adding the attributes on the android.support.design.widget.TextInputLayout tag also doesn't work. I tried)