1

OutofMemory ImageAdapter

view story
linux-howto

http://stackoverflow.com – I'm try to get images(path) from the sqldatabase and put the images to a gridview. But I get often an OutOfMemoryError. This is my Code: public void dos(File myDir) { Cursor test; MyDB con = new MyDB(mContext); test = con.selectImages(); List<String> array = new ArrayList<String>(); while(test.moveToNext()){ String uname = test.getString(2); array.add(uname); } List<File> list = new ArrayList<File>(); for (int i = 0; i < array.size(); i++) { list.add(new File(myDir + "/" + array.get(i))); } Syst (HowTos)