本文整理汇总了Java中android.widget.SeekBar.getProgress方法的典型用法代码示例。如果您正苦于以下问题:Java SeekBar.getProgress方法的具体用法?Java SeekBar.getProgress怎么用?Java SeekBar.getProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.SeekBar
的用法示例。
在下文中一共展示了SeekBar.getProgress方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
Log.i(TAG, "bottomProgress onStopTrackingTouch [" + this.hashCode() + "] ");
onEvent(JCBuriedPoint.ON_SEEK_POSITION);
startProgressTimer();
ViewParent vpup = getParent();
while (vpup != null) {
vpup.requestDisallowInterceptTouchEvent(false);
vpup = vpup.getParent();
}
if (currentState != CURRENT_STATE_PLAYING &&
currentState != CURRENT_STATE_PAUSE) return;
int time = seekBar.getProgress() * getDuration() / 100;
JCMediaManager.instance().mediaPlayer.seekTo(time);
Log.i(TAG, "seekTo " + time + " [" + this.hashCode() + "] ");
}
示例2: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
Log.i(TAG, "bottomProgress onStopTrackingTouch [" + this.hashCode() + "] ");
onEvent(JCUserAction.ON_SEEK_POSITION);
startProgressTimer();
ViewParent vpup = getParent();
while (vpup != null) {
vpup.requestDisallowInterceptTouchEvent(false);
vpup = vpup.getParent();
}
if (currentState != CURRENT_STATE_PLAYING &&
currentState != CURRENT_STATE_PAUSE) return;
int time = seekBar.getProgress() * getDuration() / 100;
JCMediaManager.instance().mediaPlayer.seekTo(time);
Log.i(TAG, "seekTo " + time + " [" + this.hashCode() + "] ");
}
示例3: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
switch (seekBar.getId()) {
case R.id.iso: {
Range<Integer> range = mCameraCharacteristics.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE);
int max = range.getUpper();
int min = range.getLower();
isoValue = ((seekBar.getProgress() * (max - min)) / 100 + min);
createCameraPreviewSession_ISO();
break;
}
case R.id.focus: {
float distance = mCameraCharacteristics.get(CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE);
focusValue = seekBar.getProgress() * distance / 100;
createCameraPreviewSession_FOCUS();
break;
}
default:
break;
}
}
示例4: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// 当进度条停止修改的时候触发
// 取得当前进度条的刻度
int progress = seekBar.getProgress();
if (mVideoView != null && mVideoView.isPlaying()) {
// 设置当前播放的位置
mVideoView.seekTo(progress);
}
show(defaultTimeout);
}
示例5: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
if (mNiceVideoPlayer.isBufferingPaused() || mNiceVideoPlayer.isPaused()) {
mNiceVideoPlayer.restart();
}
long position = (long) (mNiceVideoPlayer.getDuration() * seekBar.getProgress() / 100f);
mNiceVideoPlayer.seekTo(position);
startDismissTopBottomTimer();
}
示例6: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
Log.d(TAG, "Period Stop");
final Intent intent = new Intent(ACTION_PERIOD_UPDATE);
int period = periodMinVal + (seekBar.getProgress() * 10);
intent.putExtra(EXTRA_SERVICE_UUID, this.uuidLabel.getText());
intent.putExtra(EXTRA_PERIOD, period);
this.context.sendBroadcast(intent);
}
示例7: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
// Approximate an exponential curve with x^4. Produces a value from 60-10860.
if (fromUser) {
float value = seekBar.getProgress() / 1000.0f;
value *= value;
value *= value;
mValue = (int) (value * (MAX - MIN)) + MIN;
updateText();
}
}
示例8: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
if (getDuration() > 1) {
int time = seekBar.getProgress() * (getDuration() / progressMax);
seekTo(time);
}
startProgressTimer();
if (currentState == STATE_PLAYING)
startDismissControlViewTimer(1314);
}
示例9: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
startProgressTimer();
ViewParent vpup = getParent();
while (vpup != null) {
vpup.requestDisallowInterceptTouchEvent(false);
vpup = vpup.getParent();
}
if (currentState != CURRENT_STATE_PLAYING &&
currentState != CURRENT_STATE_PAUSE) return;
int time = seekBar.getProgress() * getDuration() / 100;
MediaManager.instance().mediaPlayer.seekTo(time);
Log.i(TAG, "seekTo " + time + " [" + this.hashCode() + "] ");
}
示例10: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
long duration = mediaPlayer.getDuration();
long newPosition = (duration * seekBar.getProgress()) / videoProgress.getMax();
mediaPlayer.seekTo((int) newPosition);
isDragging = false;
post(mShowProgress);
show();
}
示例11: updateLabel
import android.widget.SeekBar; //导入方法依赖的package包/类
public static void updateLabel(SeekBar seekBar, TextView label) {
if (seekBar.getProgress() >= SIZES.length) {
label.setText(R.string.pref_storage_no_limit);
return;
}
label.setText(SIZES[seekBar.getProgress()] + " MB");
}
示例12: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
int seekBarPosition = seekBar.getProgress();
if (mApp.isServiceRunning()) {
mApp.getService().getMediaPlayer().seekTo(seekBarPosition);
mHandler.post(seekbarUpdateRunnable);
} else {
PreferencesHelper.getInstance().put(PreferencesHelper.Key.SONG_CURRENT_SEEK_DURATION, seekBarPosition);
mDurationTextView.setText(Common.convertMillisToMinsSecs(mSeekBar.getProgress()));
}
}
示例13: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
Bundle bundle = getBundle();
bundle.putInt(OnCoverEventListener.KEY_INT_DATA,seekBar.getProgress());
notifyCoverEvent(OnCoverEventListener.EVENT_CODE_ON_SEEK_BAR_STOP_TRACKING_TOUCH,bundle);
if(player==null)
return;
if(seekBar.getMax()<=0 || getDuration() <= 0)
return;
PLog.d(TAG,"onStopTrackingTouch...");
int progress = seekBar.getProgress();
sendSeekToMsg(progress);
sendDelayHiddenControllerMsg();
}
示例14: getColorARGB
import android.widget.SeekBar; //导入方法依赖的package包/类
private static int getColorARGB(int which, SeekBar alphaSeekBar, SeekBar RSeekBar, SeekBar GSeekBar, SeekBar BSeekBar) {
final int A = alphaSeekBar.getProgress();
final int R = RSeekBar.getProgress();
final int G = GSeekBar.getProgress();
final int B = BSeekBar.getProgress();
int returned;
switch (which) {
default:
case 1:
returned = R;
break;
case 2:
returned = G;
break;
case 3:
returned = B;
break;
case 4:
returned = Color.argb(A, R, G, B);
break;
}
return returned;
}
示例15: updateProgressDisplay
import android.widget.SeekBar; //导入方法依赖的package包/类
private void updateProgressDisplay(SeekBar seekBar, TextView tv) {
int value = min + seekBar.getProgress() * stepSize;
if (unitRes != null) {
tv.setText(getString(unitRes, value));
} else {
tv.setText(String.valueOf(value));
}
}