Comments (17)
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.
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.
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.
some example for clefication:
from sheets.
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.
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
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.
I have a few more questions now.
- What about the time & calendar value, does it need to be mirrored too?
- Why do you suggest the switch between the icon buttons? I guess the icon itself should be mirrored, but not its position?
- In the photo, the title should be aligned to the close icon button?
- 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.
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.
- 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.
just set textAlignment to viewStart and it's ok
from sheets.
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.
Unfortunately not. Text alignment and gravity has no effect on the animated TextInputLayout hint. 🤔
from sheets.
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.
Unfortunately not. Text alignment and gravity has no effect on the animated TextInputLayout hint. 🤔
Rec.0003.mp4
from sheets.
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.
from sheets.
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)
- Color: TextView overlaps SeekBar HOT 2
- Localization: consider using platform resources HOT 1
- onNegative / onPositive support for dynamic drawables
- Text content on OptionSheet HOT 1
- Option constructor with long click listener without specifying sub-text. HOT 2
- Core module leaking colour attributes into consuming applications HOT 1
- make bottom sheet form scrollable HOT 1
- Option customisation support HOT 1
- Cannot use textview on bottomsheet HOT 3
- How to modify the size of the TextView of OptionSheet? HOT 1
- ColorSheet For Jetpack Compose. HOT 4
- CharSequence to the rescue
- Positive button should be invisible or unclickable.
- Custom year range in CalendarSheet HOT 1
- Text/Icons not centered when using OptionSheet as dialog HOT 1
- Upgrade to material 3. HOT 1
- Looping for option sheet HOT 1
- prevent dismiss
- Months Layout
- `rememberSheetState` and `rememberLauncherForActivityResult` not working together in the same page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sheets.