0
を取る:私はFIRSTNAMEフィールドに基づいて友達のArrayListをソートしたいアンドロイド:文字列フィールドに基づいてソート配列オブジェクトとこれは私の友人の対象であるロケールを考慮
public class Friend {
public String firstname;
public String lastname;
...
、および取るアカウントアクセント:だから
ArrayList<Friend> mFriends;
...
// Sort friend by firstname
Collections.sort(mFriends, new Comparator<Friend>() {
@Override
public int compare(Friend o1, Friend o2) {
return o1.firstname.compareTo(o2.firstname);
}
});
、どのように私は、アクセント条件を追加することができますか?