0
アダプタのListViewで再生中の現在のトラックのTextViewを設定しようとしています。 TextViewの位置が間違っていると、リスト内の最後のTextViewに常にテキストが設定されます。これが私のやり方です。TextViewは常にリスト内の最後のテキストビューのテキストを設定しています
public void startPlayProgressUpdater(final SeekBar seek, final Button start) {
seek.setProgress(mediaPlayer.getCurrentPosition());
if (mediaPlayer.isPlaying()) {
Runnable notification = new Runnable() {
public void run() {
startPlayProgressUpdater(seek,start);
currentTime.setText(getTimeString(mediaPlayer.getDuration() - mediaPlayer.getCurrentPosition()));
}
};
handler.postDelayed(notification, 1000);
} else {
mediaPlayer.pause();
seek.setProgress(0);
}
}
アダプターの 'getView'メソッドでこれを行いますか?それはあなたがそれをやるべきところです。 –