嗨,大家好我有一個應用程序,它存儲一些文件到SD卡上點擊一個按鈕,但我想顯示一個指示,其下載或dowloaded。正在下載適應症
如何達到這個我可以使用進度條。
這是我的按鈕
case R.id.dd:
File sdcard = Environment.getExternalStorageDirectory();
File dir = new File (sdcard.getAbsolutePath() + "/varun");
dir.mkdirs();
File file = new File(dir, "" +var+ ".mp3");
// File file = new File(Environment.getExternalStorageDirectory(), "" +ver+ ".mp3");
FileOutputStream fos;
try {
fos = new FileOutputStream(file);
fos.write(bitmapdata);
fos.flush();
fos.close();
} catch (FileNotFoundException e) {
// handle exception
} catch (IOException e) {
// handle exception
}
感謝你的幫助 – Goofy 2012-02-29 08:17:29