Lines Matching defs:locale

39  * user-specified configuration options (locale and scaling) as well
78 * Current user preference for the locale, corresponding to
79 * <a href="{@docRoot}guide/topics/resources/providing-resources.html#LocaleQualifier">locale</a>
82 public Locale locale;
655 if (o.locale != null) {
656 locale = (Locale) o.locale.clone();
695 if (locale != null) {
697 sb.append(locale);
699 sb.append(" ?locale");
822 locale = null;
867 if (delta.locale != null
868 && (locale == null || !locale.equals(delta.locale))) {
870 locale = delta.locale != null
871 ? (Locale) delta.locale.clone() : null;
872 // If locale has changed, then layout direction is also changed ...
876 setLayoutDirection(locale);
1026 if (delta.locale != null
1027 && (locale == null || !locale.equals(delta.locale))) {
1149 if (locale == null) {
1153 dest.writeString(locale.getLanguage());
1154 dest.writeString(locale.getCountry());
1155 dest.writeString(locale.getVariant());
1186 locale = new Locale(source.readString(), source.readString(),
1237 if (this.locale == null) {
1238 if (that.locale != null) return 1;
1239 } else if (that.locale == null) {
1242 n = this.locale.getLanguage().compareTo(that.locale.getLanguage());
1244 n = this.locale.getCountry().compareTo(that.locale.getCountry());
1246 n = this.locale.getVariant().compareTo(that.locale.getVariant());
1297 result = 31 * result + (locale != null ? locale.hashCode() : 0);
1315 * Set the locale. This is the preferred way for setting up the locale (instead of using the
1316 * direct accessor). This will also set the layout direction according to the locale.
1318 * @param loc The locale. Can be null.
1321 locale = loc;
1322 setLayoutDirection(locale);
1340 * @param locale The Locale. If null will set the layout direction to
1347 public void setLayoutDirection(Locale locale) {
1350 final int layoutDirection = 1 + TextUtils.getLayoutDirectionFromLocale(locale);
1373 public static String localeToResourceQualifier(Locale locale) {
1375 boolean l = (locale.getLanguage().length() != 0);
1376 boolean c = (locale.getCountry().length() != 0);
1377 boolean s = (locale.getScript().length() != 0);
1378 boolean v = (locale.getVariant().length() != 0);
1381 sb.append(locale.getLanguage());
1383 sb.append("-r").append(locale.getCountry());
1385 sb.append("-s").append(locale.getScript());
1387 sb.append("-v").append(locale.getVariant());
1412 if (config.locale != null && !config.locale.getLanguage().isEmpty()) {
1413 parts.add(localeToResourceQualifier(config.locale));
1649 if ((base.locale == null && change.locale != null) ||
1650 (base.locale != null && !base.locale.equals(change.locale))) {
1651 delta.locale = change.locale;
1727 private static final String XML_ATTR_LOCALE = "locale";
1759 configOut.locale = Locale.forLanguageTag(localeStr);
1810 if (config.locale != null) {
1811 XmlUtils.writeStringAttribute(xml, XML_ATTR_LOCALE, config.locale.toLanguageTag());