本文整理了Java中android.widget.SeekBar.setEnabled()
方法的一些代码示例,展示了SeekBar.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.setEnabled()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:setEnabled
暂无
代码示例来源:origin: seven332/EhViewer
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
mScreenLightness.setEnabled(isChecked);
}
});
代码示例来源:origin: seven332/EhViewer
@Override
protected void onBindView(View view) {
super.onBindView(view);
SeekBar seekBar = (SeekBar) view.findViewById(R.id.seekbar);
seekBar.setOnSeekBarChangeListener(this);
seekBar.setMax(mMax);
seekBar.setProgress(mProgress);
seekBar.setEnabled(isEnabled());
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
/**
* 根据是否广告url修改ui显示状态
*/
protected void changeAdUIState() {
if (mJumpAd != null) {
mJumpAd.setVisibility((isFirstPrepared) ? VISIBLE : GONE);
}
if (mADTime != null) {
mADTime.setVisibility((isFirstPrepared) ? VISIBLE : GONE);
}
if (mBottomContainer != null) {
int color = (isFirstPrepared) ? Color.TRANSPARENT : getContext().getResources().getColor(R.color.bottom_container_bg);
mBottomContainer.setBackgroundColor(color);
}
if (mCurrentTimeTextView != null) {
mCurrentTimeTextView.setVisibility((isFirstPrepared) ? INVISIBLE : VISIBLE);
}
if (mTotalTimeTextView != null) {
mTotalTimeTextView.setVisibility((isFirstPrepared) ? INVISIBLE : VISIBLE);
}
if (mProgressBar != null) {
mProgressBar.setVisibility((isFirstPrepared) ? INVISIBLE : VISIBLE);
mProgressBar.setEnabled(!(isFirstPrepared));
}
}
代码示例来源:origin: castorflex/SmoothProgressBar
private void setInterpolator(int position) {
switch (position) {
case 1:
mCurrentInterpolator = new LinearInterpolator();
mSeekBarFactor.setEnabled(false);
break;
case 2:
mCurrentInterpolator = new AccelerateDecelerateInterpolator();
mSeekBarFactor.setEnabled(false);
break;
case 3:
mCurrentInterpolator = new DecelerateInterpolator(mFactor);
mSeekBarFactor.setEnabled(true);
break;
case 4:
mCurrentInterpolator = new FastOutSlowInInterpolator();
mSeekBarFactor.setEnabled(true);
break;
case 0:
default:
mCurrentInterpolator = new AccelerateInterpolator(mFactor);
mSeekBarFactor.setEnabled(true);
break;
}
mProgressBar.setSmoothProgressDrawableInterpolator(mCurrentInterpolator);
mProgressBar.setSmoothProgressDrawableColors(getResources().getIntArray(R.array.gplus_colors));
updateValues();
}
代码示例来源:origin: lingochamp/FileDownloader
private void checkEndAll() {
final boolean isEndAll = overTaskPb.getProgress() >= Integer.valueOf(taskCountTv.getText().toString());
if (isEndAll) {
Log.d(TAG, String.format("start[%d] over[%d]", GlobalMonitor.getImpl().getMarkStart(),
GlobalMonitor.getImpl().getMarkOver()));
stopTimeCount();
actionBtn.setTag(true);
actionBtn.setText("Start");
taskCountSb.setEnabled(true);
}
}
代码示例来源:origin: CarGuo/GSYVideoPlayer
/**
* 根据是否广告url修改ui显示状态
*/
protected void changeAdUIState() {
if (mJumpAd != null) {
mJumpAd.setVisibility((isFirstPrepared && isAdModel) ? VISIBLE : GONE);
}
if (mADTime != null) {
mADTime.setVisibility((isFirstPrepared && isAdModel) ? VISIBLE : GONE);
}
if (mWidgetContainer != null) {
mWidgetContainer.setVisibility((isFirstPrepared && isAdModel) ? GONE : VISIBLE);
}
if (mBottomContainer != null) {
int color = (isFirstPrepared && isAdModel) ? Color.TRANSPARENT : getContext().getResources().getColor(R.color.bottom_container_bg);
mBottomContainer.setBackgroundColor(color);
}
if (mCurrentTimeTextView != null) {
mCurrentTimeTextView.setVisibility((isFirstPrepared && isAdModel) ? INVISIBLE : VISIBLE);
}
if (mTotalTimeTextView != null) {
mTotalTimeTextView.setVisibility((isFirstPrepared && isAdModel) ? INVISIBLE : VISIBLE);
}
if (mProgressBar != null) {
mProgressBar.setVisibility((isFirstPrepared && isAdModel) ? INVISIBLE : VISIBLE);
mProgressBar.setEnabled(!(isFirstPrepared && isAdModel));
}
}
代码示例来源:origin: TeamNewPipe/NewPipe
@Override
public void onBlocked() {
super.onBlocked();
controlsVisibilityHandler.removeCallbacksAndMessages(null);
animateView(controlsRoot, false, DEFAULT_CONTROLS_DURATION);
playbackSeekBar.setEnabled(false);
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-, so sets the color again
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
loadingPanel.setBackgroundColor(Color.BLACK);
animateView(loadingPanel, true, 0);
animateView(surfaceForeground, true, 100);
}
代码示例来源:origin: TeamNewPipe/NewPipe
@Override
public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {
if (DEBUG)
Log.d(TAG, "onCheckedChanged() called with: group = [" + group + "], checkedId = [" + checkedId + "]");
boolean flag = true;
switch (checkedId) {
case R.id.audio_button:
setupAudioSpinner();
break;
case R.id.video_button:
setupVideoSpinner();
break;
case R.id.subtitle_button:
setupSubtitleSpinner();
flag = false;
break;
}
threadsSeekBar.setEnabled(flag);
}
代码示例来源:origin: lingochamp/FileDownloader
private void pause() {
FileDownloader.getImpl().pause(downloadListener);
stopTimeCount();
taskCountSb.setEnabled(true);
}
代码示例来源:origin: TeamNewPipe/NewPipe
@Override
public void onPlaying() {
super.onPlaying();
updateStreamRelatedViews();
showAndAnimateControl(-1, true);
playbackSeekBar.setEnabled(true);
// Bug on lower api, disabling and enabling the seekBar resets the thumb color -.-, so sets the color again
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)
playbackSeekBar.getThumb().setColorFilter(Color.RED, PorterDuff.Mode.SRC_IN);
loadingPanel.setVisibility(View.GONE);
animateView(currentDisplaySeek, AnimationUtils.Type.SCALE_AND_ALPHA, false, 200);
}
代码示例来源:origin: smuyyh/BookReader
private void startAutoLightness() {
SettingManager.getInstance().saveAutoBrightness(true);
ScreenUtils.startAutoBrightness(ReadActivity.this);
seekbarLightness.setEnabled(false);
}
代码示例来源:origin: smuyyh/BookReader
private void stopAutoLightness() {
SettingManager.getInstance().saveAutoBrightness(false);
ScreenUtils.stopAutoBrightness(ReadActivity.this);
seekbarLightness.setProgress((int) (ScreenUtils.getScreenBrightnessInt255() / 255.0F * 100));
seekbarLightness.setEnabled(true);
}
代码示例来源:origin: lingochamp/okdownload
holder.prioritySb.setProgress(priority);
if (this.context.isStarted()) {
holder.prioritySb.setEnabled(false);
} else {
holder.prioritySb.setEnabled(true);
holder.prioritySb.setOnSeekBarChangeListener(
new SeekBar.OnSeekBarChangeListener() {
代码示例来源:origin: lingochamp/FileDownloader
taskCountSb.setEnabled(false);
代码示例来源:origin: seven332/EhViewer
mCustomScreenLightness.setChecked(Settings.getCustomScreenLightness());
mScreenLightness.setProgress(Settings.getScreenLightness());
mScreenLightness.setEnabled(Settings.getCustomScreenLightness());
代码示例来源:origin: palaima/DebugDrawer
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
networkQualityConfig.networkEnabled(isChecked);
delaySeekBar.setEnabled(isChecked);
errorSeekBar.setEnabled(isChecked);
}
});
代码示例来源:origin: curtis2/SuperVideoPlayer
/**
* 设置MediaController的可用状态。包括进度条和播放/暂停按钮。
*/
@Override
public void setEnabled(boolean enabled) {
if (mPauseButton != null)
mPauseButton.setEnabled(enabled);
if (mProgress != null)
mProgress.setEnabled(enabled);
super.setEnabled(enabled);
}
代码示例来源:origin: googlemaps/android-samples
/**
* Update the enabled state of the custom duration controls.
*/
private void updateEnabledState() {
mCustomDurationToggle.setEnabled(mAnimateToggle.isChecked());
mCustomDurationBar
.setEnabled(mAnimateToggle.isChecked() && mCustomDurationToggle.isChecked());
}
代码示例来源:origin: CarGuo/RecordWave
@Override
public void run() {
playBtn.setEnabled(false);
seekBar.setEnabled(false);
}
});
代码示例来源:origin: CarGuo/RecordWave
@Override
public void run() {
playeEnd = true;
playBtn.setText("播放");
playBtn.setEnabled(true);
seekBar.setEnabled(false);
}
});
内容来源于网络,如有侵权,请联系作者删除!