List<ContentValues> ls=new ArrayList<ContentValues>();
Collections.sort(ls, new ComparatorValues());
public static final class ComparatorValues implements Comparator<ContentValues>{
@Override
public int compare(ContentValues object1, ContentValues object2) {
int m1=object1.getAsInteger(KEY_m);
int m2=object2.getAsInteger(KEY_m);
int result=0;
if(m1>m2)
{
result=1;
}else if(m1<m2)
{
result=-1;
}else{
result=0;
}
return result;
}
}