mirror of
https://github.com/FatttSnake/OxygenToolbox.git
synced 2026-04-05 04:41:26 +08:00
Fixed an issue where the set language could not be loaded correctly on cold start.
This commit is contained in:
@@ -22,16 +22,16 @@ public class App extends Application {
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
ResourceUtil.init(App.this);
|
||||
SharedPreferencesUtils.init(App.this);
|
||||
ResourceUtil.setAppLocale(SharedPreferencesUtils.getPreferenceLocale());
|
||||
loadTools();
|
||||
|
||||
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
|
||||
@Override
|
||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle bundle) {
|
||||
ResourceUtil.init(App.this);
|
||||
SharedPreferencesUtils.init(App.this);
|
||||
|
||||
ResourceUtil.setAppLocale(SharedPreferencesUtils.getPreferenceLocale());
|
||||
ResourceUtil.loadAppTheme(activity);
|
||||
loadAppUiMode();
|
||||
loadTools();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user