请参考以下网址以了解如何实现自定义列表视图
更新资料
public static class VideoInfo { public String name = ""; public String size= ""; public String path = "";//add any more variables of which you want info }然后在哪里创建arraylist,即
getVideoFiles()创建此类的对象
ArrayList<VideoInfo> videoItems;
private void getVideoFiles(File[] videoList) { videoItems = new ArrayList<VideoInfo>(); for (int i = 0; i < videolist.length; i++) { File mfile = videoList[i]; String path = mfile.getPath(); path = path.substring(path.lastIndexOf("/", path.indexOf(".")); VideoInfo model = new VideoInfo(); model.name = path; model.size = mfile.length(); videoItems.add(model); } setListAdapter(new ListViewAdapter(this, R.layout.row, videoItems)); }现在在您的适配器中传递该arraylist对象,以及如何在listview中设置变量已在上面的链接中给出



