lingver icon indicating copy to clipboard operation
lingver copied to clipboard

Layout Direction bug after split-screen mode

Open TurKurT656 opened this issue 4 years ago • 11 comments

I've set the locale with this code: Lingver.getInstance().setLocale(requireContext(), "fa") It use RTL layout direction. Everything works great, but when I use the app in split screen mode and then maximize it again layout direction resets to LTR (but it uses farsi strings).

How can I fix the issue?

TurKurT656 avatar Nov 10 '20 11:11 TurKurT656

I'd highly appreciate it if you could create a small sample project reproducing the issue. Otherwise, it's hard to find out the cause of the issue without looking into details of your implementation.

Thanks in advance!

YarikSOffice avatar Nov 11 '20 09:11 YarikSOffice

I've created a sample repo for this: LingverTest

TurKurT656 avatar Nov 11 '20 13:11 TurKurT656

Steps to generate bug:

1) 1

2) 2

3) 3

4) 4

5) 5

TurKurT656 avatar Nov 11 '20 13:11 TurKurT656

I have the same issue too.

hamedsilver avatar Nov 12 '20 15:11 hamedsilver

@YarikSOffice did you see the sample?

TurKurT656 avatar Nov 17 '20 19:11 TurKurT656

I have the same issue when app goes landscape. The layout direction changed to system setting after changing direction. The activity config in manifest is android:configChanges="keyboardHidden|orientation|screenSize"

vahid-m avatar Dec 02 '20 12:12 vahid-m

UpdateLocaleDelegate class doesn't have this : config.setLayoutDirection(targetLocale), so just put it to fun updateResources

Kolyall avatar Jan 12 '21 13:01 Kolyall

@Kolyall I don't think I'd help since config.setLayoutDirection is being invoked automatically within config.setLocale/setLocales call.

Screenshot 2021-01-26 at 11 12 42

YarikSOffice avatar Jan 26 '21 09:01 YarikSOffice

I've given it a few tries, but haven't found a solution yet. Marking the bug as a known issue for now.

YarikSOffice avatar Jan 26 '21 09:01 YarikSOffice

Any update on this? Because it's happening with the deep link too

mnayef95 avatar Feb 12 '21 11:02 mnayef95

I haven't found any solution yet.

If you provide a sample project, I can check whether your issue is related to this bug.

YarikSOffice avatar Feb 15 '21 20:02 YarikSOffice