本文整理了Java中android.widget.SeekBar.postDelayed()
方法的一些代码示例,展示了SeekBar.postDelayed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.postDelayed()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:postDelayed
暂无
代码示例来源:origin: naman14/Timber
@Override
public void onResume() {
super.onResume();
fragmentPaused = false;
if (mProgress != null)
mProgress.postDelayed(mUpdateProgress, 10);
if (mCircularProgress != null)
mCircularProgress.postDelayed(mUpdateCircularProgress, 10);
}
代码示例来源:origin: naman14/Timber
@Override
public void run() {
long position = MusicPlayer.position();
if (mProgress != null) {
mProgress.setProgress((int) position);
if (elapsedtime != null && getActivity() != null)
elapsedtime.setText(TimberUtils.makeShortTimeString(getActivity(), position / 1000));
}
overflowcounter--;
int delay = 250; //not sure why this delay was so high before
if (overflowcounter < 0 && !fragmentPaused) {
overflowcounter++;
mProgress.postDelayed(mUpdateProgress, delay); //delay
}
}
};
代码示例来源:origin: naman14/Timber
mProgress.removeCallbacks(mUpdateProgress);
mProgress.postDelayed(mUpdateProgress, 10);
代码示例来源:origin: wufenglincheng/ImageTrans
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
seekBar.postDelayed(new Runnable() {
@Override
public void run() {
if (imageView != null)
loadImage();
}
}, 300);
}
代码示例来源:origin: xbmc/Kore
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
if (onProgressChangeListener != null)
onProgressChangeListener.onProgressChanged(seekBar.getProgress());
if (speed > 0)
seekBar.postDelayed(seekBarUpdater, SEEK_BAR_UPDATE_INTERVAL);
}
});
代码示例来源:origin: xbmc/Kore
/**
* Sets the play speed for the progress indicator
* @param speed set to 0 to stop updating the progress indicator.
*/
public void setSpeed(int speed) {
if( speed == this.speed )
return;
this.speed = speed;
this.progressIncrement = speed * (SEEK_BAR_UPDATE_INTERVAL/1000);
seekBar.removeCallbacks(seekBarUpdater);
if (speed > 0)
seekBar.postDelayed(seekBarUpdater, SEEK_BAR_UPDATE_INTERVAL);
}
代码示例来源:origin: bhuvnesh123/FFmpeg-Video-Editor-Android
@Override
public void run() {
if (seekBar != null) {
seekBar.setProgress(videoView.getCurrentPosition());
}
if (videoView.isPlaying()) {
seekBar.postDelayed(onEverySecond, 1000);
}
}
};
代码示例来源:origin: bhuvnesh123/FFmpeg-Video-Editor-Android
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
seekBar.setMax(videoView.getDuration());
seekBar.postDelayed(onEverySecond, 1000);
}
});
代码示例来源:origin: xbmc/Kore
@Override
public void run() {
if (seekBar == null) // prevent NPE when Butterknife unbinds the view while there was still a runnable pending
return;
if ((maxProgress == 0) || (progress >= maxProgress)) {
seekBar.removeCallbacks(this);
return;
}
progress += progressIncrement;
setProgress(progress);
seekBar.postDelayed(this, SEEK_BAR_UPDATE_INTERVAL);
}
};
代码示例来源:origin: rohanoid5/Muzesto
@Override
public void run() {
if (mProgress != null) {
long position = MusicPlayer.position();
mProgress.setProgress((int) position);
if (elapsedtime != null && getActivity() != null)
elapsedtime.setText(TimberUtils.makeShortTimeString(getActivity(), position / 1000));
}
if (MusicPlayer.isPlaying()) {
mProgress.postDelayed(mUpdateProgress, 50);
}
}
};
代码示例来源:origin: brainysoon/cyberCar
@Override
public void run() {
if (mProgress != null) {
long position = MusicPlayer.position();
mProgress.setProgress((int) position);
if (elapsedtime != null && getActivity() != null)
elapsedtime.setText(TimberUtils.makeShortTimeString(getActivity(), position / 1000));
}
if (MusicPlayer.isPlaying()) {
mProgress.postDelayed(mUpdateProgress, 50);
}
}
};
代码示例来源:origin: stackoverflow.com
seekBar.postDelayed(new Runnable() {
@Override
public void run() {
代码示例来源:origin: rohanoid5/Muzesto
mProgress.removeCallbacks(mUpdateProgress);
mProgress.postDelayed(mUpdateProgress, 10);
代码示例来源:origin: brainysoon/cyberCar
mProgress.removeCallbacks(mUpdateProgress);
mProgress.postDelayed(mUpdateProgress, 10);
内容来源于网络,如有侵权,请联系作者删除!