Can not force ltr in RTL languages
DHosseiny opened this issue · 1 comments
✍️ Describe the bug
Our app is targeting Android 13(targetSdk 33) and we are forcing the app to be Persian (an rtl language) at first, but users can change to English in settings. Before targeting API level 33 chucker showed its views LTR when our app was RTL. But now it is RTL and that is not convenient.
I guess that is because we are calling AppCompatDelegate.setApplicationLocales(LocaleList)
in new changes. Somehow I want to force Chucker to be LTR.
Is there any way to force it to be LTR? or It can be added?
💣 Steps to reproduce
Create a sample app force app language in application class onCreate to rtl language like:
AppCompatDelegate.setApplicationLocales(LocaleListCompat.forLanguageTags("fa"))
go to chucker and it is RTL
🔧 Expected behavior
Set to Be Ltr with ChuckerInterceptor
📷 Screenshots
📱 Tech info
tested on android 13 and 14 device
📄 Additional context
You should be able to do so by adding this in your styles.xml
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Chucker.BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="android:layoutDirection">ltr</item>
</style>
</resources>