Android/File
Sd Card 이미지 읽어오기
berabue
2011. 2. 14. 09:53
if ( Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { String path = Environment.getExternalStorageDirectory()+"/android/data/pe.berabue.maptools/.image"; File file = new File(path); String str; int num = 0; int imgCount = file.listFiles().length; // 파일 총 갯수 얻어오기 map = new Bitmap[imgCount]; if ( file.listFiles().length > 0 ) for ( File f : file.listFiles() ) { str = f.getName(); // 파일 이름 얻어오기 map[num] = BitmapFactory.decodeFile(path+"/"+str); num++; } }