Example usage for android.content.res Configuration getLocales

List of usage examples for android.content.res Configuration getLocales

Introduction

In this page you can find the example usage for android.content.res Configuration getLocales.

Prototype

public @NonNull LocaleList getLocales() 

Source Link

Document

Get the locale list.

Usage

From source file:com.vrem.wifianalyzer.settings.CountryPreference.java

@NonNull
@SuppressWarnings("deprecation")
private static Locale getLocale(@NonNull Configuration config) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
        return config.getLocales().get(0);
    }//from   www  .j  a  v  a  2s  .com
    return config.locale;
}