Git Product home page Git Product logo

Comments (17)

maxkeppeler avatar maxkeppeler commented on July 30, 2024

I don't have experience with this yet. I just enabled pseudoLocalesEnabled and used arabic locale on my device - and most of the bottom sheets mirror the layout perfectly. Why do I need to add window.decorView.layoutDirection = View.LAYOUT_DIRECTION_RTL?

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

I see that the OptionSheet in LIST style doesn't align the text to the right. And numbers are not localized (I did not even know that this is a thing). And icons need to be localized as well, especially for the ClockTimeSheet and TimeSheet.

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

well actually we making apps fully forced to RTL and use native language of that country , regardless phone language or location so I personally put ((android:layoutDirection="rtl")) to every xml file to achieve this.

I think if there was a setter which force layout locale it would nice

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

some example for clefication:

image

image

image

image

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

But what you showcase automatically happened, when my phone was in a rtl language and then it enforced the rtl mirroring in the sample app, without me adding anything. So you want to override that to always enforce rtl and never ltr?

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

automatically happened, when my phone was in a rtl language and then it enforced the rtl mirroring in the sample app

well this is not true, because as you see for example the number pad is mirroring too which it should not, and there are some other cases like this
image

So you want to override that to always enforce rtl and never ltr?

yes, it's only way to achieve a native app (by native I meant a fully Arabic app that Arab people are going to use or any other RTL language )

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

I have a few more questions now.

  1. What about the time & calendar value, does it need to be mirrored too?
  2. Why do you suggest the switch between the icon buttons? I guess the icon itself should be mirrored, but not its position?
  3. In the photo, the title should be aligned to the close icon button?
  4. If it's rtl, why is the order of the numbers still ltr? When I check the guidelines, I don't recognize a rule which would prevent it from being mirrored (time relevance etc.)

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

I also have trouble displaying the TextInputLayout Hint to rtl and found this issue:
https://issuetracker.google.com/issues/37055931

Any idea how to fix this? The hint stays aligned to the left and animates upwards to the outlined box. (That's in rtl the same place where the endIcon is.)

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024
  1. What about the time & calendar value, does it need to be mirrored too?

numbers are LTR in all languages so the answer is no, so for time hh:mm:ss, and for date yy:mm:dd
(however the calendar is useless Persians and Arabs have there own calendar system one based on sun and the other based on moon position from earth)

2. Why do you suggest the switch between the icon buttons?

I don't suggest switch between the icon buttons, my point was a horizontal list view in RTL view should start from right, and about icons it's overkill to mirror them but if you feel to it, it's ok

  • In the photo, the title should be aligned to the close icon button?

I don't get what you mean

4. If it's rtl, why is the order of the numbers still ltr? When I check the guidelines, I don't recognize a rule which would prevent it from being mirrored (time relevance etc.)

numbers are LTR in all languages, and I can't explain it to you well because of my poor english but trust me, and if you want I can draw layouts that you are not sure about

I also have trouble displaying the TextInputLayout Hint to rtl

that's not a good idea to force TextInputLayout to rtl or ltr, the language of text decide it self

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

just set textAlignment to viewStart and it's ok

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

wow we talked a lot about this
I think this library is super cool
if I have some free time I will contribute and add this my self, but it's like 2 month later, right now I'm in middle of some project.
btw thanks

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

Unfortunately not. Text alignment and gravity has no effect on the animated TextInputLayout hint. 🤔

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

Current progress is in the branch feature-bidirectionality, I probably finish it before you have time - I have to get a better understanding of the changes in rtl mode. And thanks!

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

Unfortunately not. Text alignment and gravity has no effect on the animated TextInputLayout hint. 🤔

Rec.0003.mp4

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

Current progress is in the branch feature-bidirectionality, I probably finish it before you have time - I have to get a better understanding of the changes in rtl mode. And thanks!

cool, maybe I try to provide it in farsi language not just rtl

from sheets.

maxkeppeler avatar maxkeppeler commented on July 30, 2024

from sheets.

mohamadjavadx avatar mohamadjavadx commented on July 30, 2024

That's weird, so It only works with a rtl language? When enforced rtl with a ltr language, it stays on the left despite the gravity. But that's great, that fixes this problem.

On Wed, 6 Jan 2021, 16:00 mohamadjavad @.***> wrote: Unfortunately not. Text alignment and gravity has no effect on the animated TextInputLayout hint. 🤔 https://user-images.githubusercontent.com/57070063/103782761-1d58e100-504d-11eb-8613-269ff0668316.mp4 — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#27 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTAQMBAZE5NJ2NTQDHGEETSYR3HFANCNFSM4VSJJ4LA .

yes, there is no problem language will take care

from sheets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.