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

AppLocale & PreferenceFragmentCompat #36

Closed
smelfungus opened this issue Jan 27, 2022 · 2 comments
Closed

AppLocale & PreferenceFragmentCompat #36

smelfungus opened this issue Jan 27, 2022 · 2 comments

Comments

@smelfungus
Copy link

It seems like AppLocale does not affect PreferenceFragmentCompat with setPreferencesFromResource?

@B3nedikt
Copy link
Owner

B3nedikt commented Jan 27, 2022

Yeah, this does not work out of the box. The issue is that the PreferenceFragmentCompat does not use the default LayoutInflater. So you have to somehow get the context wrapped using AppLocale.wrap(context) into the inflation process. I think the easiest way around this would be extending PreferenceFragmentCompat and overwriting getContext() to return a wrapped one with AppLocale.wrap(context). Does this help you?

@smelfungus
Copy link
Author

@B3nedikt makes sense, thank you!

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