-
Notifications
You must be signed in to change notification settings - Fork 6
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
Initial preferred language shared pref support. #40
Conversation
This doesn't yet allow you to set the shared pref, but it does work if you hardcode the language in the code.
This is partially operational. You can click the Russian item in the Language select and then navigate elsewhere in the app and the Russian translations apply. Fine to merge if you're OK with the progress. |
@@ -66,6 +67,15 @@ | |||
@Override | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); | |||
PreferredLanguageSupport.applyPreferredLanguage(this); | |||
final Activity thisActivity = NavigationActivity.this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an aesthetic thing? Or is there a technical reason for saving a final reference here? (this is the first time I've seen this pattern)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm transitioning the variable reference from the local scope to effectively member scope in an anon class so it needs to be final in Java. Many times you'll see parameters in methods declared final for this reason as well.
Looks good. I'll go ahead and merge so it's easier to use in our time zone. I had a couple informational questions, looking forward to learning more Java 😸 |
No description provided.