Code example for Collator

Methods: compare

0
            return this.label;
        } 
 
        @Override 
        public int compareTo(LocaleInfo another) {
            return sCollator.compare(this.label, another.label);
        } 
    } 
 
    /** 
     * Constructs an Adapter object containing Locale information. Content is sorted by 
     * {@link LocaleInfo#label}. 
     */ 
    public static ArrayAdapter<LocaleInfo> constructAdapter(Context context) {
        return constructAdapter(context, false /* disable pesudolocales */);
    } 
 
    public static ArrayAdapter<LocaleInfo> constructAdapter(Context context,
                                                            final boolean isInDeveloperMode) {
        return constructAdapter(context, R.layout.locale_picker_item, R.id.locale,
                isInDeveloperMode);