当前位置: 首页>>代码示例>>Java>>正文


Java SeekBar.getProgress方法代码示例

本文整理汇总了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() + "] ");
}
 
开发者ID:wp521,项目名称:MyFire,代码行数:17,代码来源:JCVideoPlayer.java

示例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() + "] ");
}
 
开发者ID:Longalei,项目名称:Edu,代码行数:17,代码来源:JCVideoPlayer.java

示例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;
    }

}
 
开发者ID:wingskyer,项目名称:android-Camera2Basic-master,代码行数:23,代码来源:Camera2BasicFragment.java

示例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);
}
 
开发者ID:CoderCF,项目名称:SuperVideoPlayer,代码行数:12,代码来源:SuperPlayer.java

示例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();
}
 
开发者ID:crazysunj,项目名称:CrazyDaily,代码行数:10,代码来源:NeihanVideoPlayerController.java

示例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);
}
 
开发者ID:KunYi,项目名称:SensorTag2Testing,代码行数:10,代码来源:GenericTabRow.java

示例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();
    }
}
 
开发者ID:89luca89,项目名称:ThunderMusic,代码行数:12,代码来源:IdlePreference.java

示例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);
}
 
开发者ID:tohodog,项目名称:QSVideoPlayer,代码行数:11,代码来源:QSVideoViewHelp.java

示例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() + "] ");
}
 
开发者ID:qq1210514049,项目名称:ListVideoPlayer,代码行数:15,代码来源:ListVideoPlayer.java

示例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();
}
 
开发者ID:dueeeke,项目名称:dkplayer,代码行数:10,代码来源:FullScreenController.java

示例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");
}
 
开发者ID:MCMrARM,项目名称:revolution-irc,代码行数:8,代码来源:StorageLimitsDialog.java

示例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()));
    }
}
 
开发者ID:reyanshmishra,项目名称:Rey-MusicPlayer,代码行数:12,代码来源:NowPlayingBottomBarFragment.java

示例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();
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:15,代码来源:DefaultPlayerControllerCover.java

示例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;
    }
 
开发者ID:enricocid,项目名称:ColorBox-library,代码行数:31,代码来源:ColorPickerFragment.java

示例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));
    }
}
 
开发者ID:MFlisar,项目名称:RecyclerViewPreferences,代码行数:9,代码来源:NumberSettingsDialogFragment.java


注:本文中的android.widget.SeekBar.getProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。