DroidKaigi / conference-app-2017

The Official Conference App for DroidKaigi 2017 Tokyo
Apache License 2.0
470 stars 140 forks source link

[WIP] stop using updateConfiguration #315

Closed rei-m closed 7 years ago

rei-m commented 7 years ago

Issue

Overview (Required)

Links

Screenshot

Before After
konifar commented 7 years ago

:eyes:

konifar commented 7 years ago

Thanks! πŸ‘ I have a question πŸ™‹

SetUp Locale on attachBaseContext. And Pass that to CalligraphyContextWrapper.

The locale is initialized in BaseActivity on this PR. Is it applied to non-activity class such as Notification?

rei-m commented 7 years ago

The locale is initialized in BaseActivity on this PR. Is it applied to non-activity class such as Notification?

No... This Setting is applied only activities. Locale of Notification is SystemLocale. I searched to apply configuration that created by context.createConfigurationContext, and found this solution only.

shiren-wanderer commented 7 years ago

As @rei-m mentioned, this is only for activities but not non-activity stuff. The main issue here is that createConfigurationContext() just returns context instead of directly updating it. Thus, MainApplication's context only can have the latest locale after app restart.

konifar commented 7 years ago

@rei-m Sorry, I'm not sure this is correct fix or not. Please let me investigate more and wait to merge πŸ™‡

rei-m commented 7 years ago

@shiren-wanderer Thanks πŸ™‡ I'll try to setup at Application's attachBaseContext.

@konifar OK. I continue to investigation too.

konifar commented 7 years ago

Sorry for too late review πŸ™‡ πŸ™‡ πŸ™‡ In my investigation, latest Android doesn't want to allow changing locale from app πŸ€” So I want to move this locale change option to debug menu. If you agree, I'll create another issue. What do you think?

rei-m commented 7 years ago

@konifar Ok!! I agreeπŸ‘Œ then please close this PR and create another issue πŸ™‡