读取SD卡某一文件夹的图片后排序,并显示用GridView显示,怎样实现排序?
如题! --------------------编程问答--------------------
File file = new File("/mnt/sdcard/menuimage");
if(file !=null){
File[] files = file.listFiles
for (File f : files)
{
if(isImageFile(f.getPath())){
imagePaths.add(f.getPath());
}
}
Collections.sort(imagePaths,String.CASE_INSENSITIVE_ORDER); //排序
}
补充:移动开发 , Android