-
-
Notifications
You must be signed in to change notification settings - Fork 19
fix(FlexboxLayout): issue #6156 and replace auto RTL detected by manual #163
base: master
Are you sure you want to change the base?
Conversation
@xlmnxp your modifications are in java (Android) code while NativeScript/NativeScript#6156 is related to an iOS issue. Also, I don't think the proposed change of replacing automatic with manual rtl detection for Android has an added benefit. |
@manoldonev I'm working on a project that adds support for RTL layouts |
Ok but this change disables automatic rtl detection for the built-in NativeScript FlexboxLayout even in scenarios where your rtl plugin is not used. I think you should explore other options to achieve the desired effect e.g. implement your new property / override onLayout(...) in your own class that extends FlexboxLayout (as far as I can see that is the approach you are using for the rest of the layout classes). |
@manoldonev FlexboxLayout is an anomaly for other layouts where it is the only one that detect the right-to-left direction automatically and the problem is that that it is only in the android system. |
@xlmnxp I agree that best option is to support automatic rtl detection out-of-the-box. As for your PR -- we are not prepared to introduce such kind of breaking change for the FlexboxLayout. Alternative option could be to introduce a three-way rtlMode property (enum or Boolean) that would keep the current automatic behavior as default but would allow you to set it manually for your plugin scenarios. |
@manoldonev ok I'll do it |
@xlmnxp btw I was wondering did you consider extending the automatic rtl support within the built-in NativeScript core modules via community PR before deciding to implement your plugin? if yes -- what kind of problems did you encounter? |
Hey @xlmnxp, |
PR Checklist
What is the current behavior?
I replaced auto RTL detected by manual detected
What is the new behavior?
I replaced auto RTL detected by manual detected
new you can change direction FlexboxLayout ( by default is LTR ) by
setRtl(boolean rtl)
Fixes #6156.
BREAKING CHANGES:
mIsRtl
by defaultfalse
mIsRtl