How are these two calls to get Locale different?

时间:2017-08-04 12:24:06

标签: android localization

In Android, What are these calls to get Locale different:

Locale.getDefault()

and

getResources().getConfiguration().locale

1 个答案:

答案 0 :(得分:0)

The locale selected on the device when the app was launched is the default locale returned by:

Locale.getDefault()

The locale currently selected on the device is the current locale (can be different from the default locale if the user changed the setting after the app launch) returned by:

getResources().getConfiguration().locale