MediaPlayer, ProgressBar
Czy to właściwy sposób aktualizacji paska ProgressBar podczas odtwarzania multimediów? Doszedłem do wniosku, że w MediaPlayer będzie oddzwonienie, ale nie mogłem go znaleźć.
<code>mediaPlayer.start(); final SeekBar progress = (SeekBar) dialog.findViewById(R.id.seekBar1); progress.setMax(mediaPlayer.getDuration()); new CountDownTimer(mediaPlayer.getDuration(), 250) { public void onTick(long millisUntilFinished) { progress.setProgress(progress.getProgress() + 250); } public void onFinish() {} }.start(); </code>
Z poważaniem.