Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not force ltr in RTL languages #1191

Open
DHosseiny opened this issue Feb 27, 2024 · 1 comment
Open

Can not force ltr in RTL languages #1191

DHosseiny opened this issue Feb 27, 2024 · 1 comment

Comments

@DHosseiny
Copy link

DHosseiny commented Feb 27, 2024

✍️ 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

308144380-ac71f873-1e83-4edf-a68d-f03114578765

📱 Tech info

tested on android 13 and 14 device

📄 Additional context

@cortinico
Copy link
Member

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants