开发者

Sort 2-dimensional String array on Android

开发者 https://www.devze.com 2023-02-04 01:56 出处:网络
I want to sort a 2-dimensional String array like this \"xx\", \"text 1\" \"aa\", \"text 2\" \"mm\", \"text 3\"

I want to sort a 2-dimensional String array like this

"xx", "text 1"
"aa", "text 2"
"mm", "text 3"

to look like this

"aa", "text 2"
"mm"开发者_开发知识库, "text 3"
"xx", "text 1"

I have already found a method to do this in Java, but this won't work on Android (at least not with 1.6, which is necessary for me), because columnComparator is not available.

Does anyone know how to do this?


ColumnComparator is that guy's own class that he's created by extending Comparator. Do the same and it will work for you !

0

精彩评论

暂无评论...
验证码 换一张
取 消