ダウンロードの進行状況をプログレスバーに表示するアプリを開発しました。
while ((chunkBytes = httpInputStream.read(outputByte, 0, 1024)) != -1) {
bytesRead = bytesRead + chunkBytes;
// write contents to the file
fileOutputStream.write(outputByte, 0, (int) chunkBytes);
// publish the progress of downloading..
publishProgress((int)((bytesRead)*100/fileSize));
}
しかし、私がやろうとしているのは、その58/100の代わりに..(二次進行状況?)その進行状況の下に3.5 mb / 5.5 mb ....(ダウンロードされたMB /合計MB)を表示したいです..私は持っています二次的な進行状況を変更しようとしましたが、役に立ちませんでした。他に方法はありますか?