本文整理了Java中android.widget.SeekBar.getId()
方法的一些代码示例,展示了SeekBar.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SeekBar.getId()
方法的具体详情如下:
包路径:android.widget.SeekBar
类名称:SeekBar
方法名:getId
暂无
代码示例来源:origin: smuyyh/BookReader
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (seekBar.getId() == seekbarFontSize.getId() && fromUser) {
calcFontSize(progress);
} else if (seekBar.getId() == seekbarLightness.getId() && fromUser
&& !SettingManager.getInstance().isAutoBrightness()) { // 非自动调节模式下 才可调整屏幕亮度
ScreenUtils.saveScreenBrightnessInt100(progress, ReadActivity.this);
//SettingManager.getInstance().saveReadBrightness(progress);
}
}
代码示例来源:origin: burhanrashid52/PhotoEditor
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
switch (seekBar.getId()) {
case R.id.sbOpacity:
if (mProperties != null) {
mProperties.onOpacityChanged(i);
}
break;
case R.id.sbSize:
if (mProperties != null) {
mProperties.onBrushSizeChanged(i);
}
break;
}
}
代码示例来源:origin: zhanyongsheng/BrokenView
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.seekbar_complexity:
complexityTv.setText("" + (progress + 8));
break;
case R.id.seekbar_break:
breakTv.setText((progress + 500) + "ms");
break;
case R.id.seekbar_fall:
fallTv.setText((progress + 1000) + "ms");
break;
case R.id.seekbar_radius:
radiusTv.setText((progress + 20) + "dp");
break;
}
}
@Override
代码示例来源:origin: yuyangXu0222/eBook
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
if (seekBar.getId() == R.id.brightness_seek_bar) {
//开始拖动亮度进度条,关闭自动调整亮度
mSwitchView.setChecked(false);
}
}
代码示例来源:origin: yuyangXu0222/eBook
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
//停止拖动时才改变字体大小
if (seekBar.getId() == R.id.text_size_seek_bar) {
if (mListener != null)
mListener.onSizeChanged(seekBar.getProgress());
}
}
代码示例来源:origin: developer-shivam/WaveView
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
if (seekBar.getId() == R.id.seekBarSpeed) {
if (fromUser) {
Log.d("Value", String.valueOf(progress));
view.setSpeed(progress);
}
} else if (seekBar.getId() == R.id.seekBarAmplitude) {
if (fromUser) {
view.setAmplitude(progress);
}
}
}
代码示例来源:origin: wufenglincheng/ImageTrans
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.seek_bar_width: {
dragParentView.requestChildWidth(seekBar.getProgress());
break;
}
case R.id.seek_bar_height: {
dragParentView.requestChildHeight(seekBar.getProgress());
break;
}
}
}
代码示例来源:origin: mosamabinomar/AndroidEqualizer
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mEqualizer.setBandLevel(equalizerBandIndex, (short) (progress + lowerEqualizerBandLevel));
points[seekBar.getId()] = mEqualizer.getBandLevel(equalizerBandIndex) - lowerEqualizerBandLevel;
Settings.seekbarpos[seekBar.getId()] = (progress + lowerEqualizerBandLevel);
Settings.equalizerModel.getSeekbarpos()[seekBar.getId()] = (progress + lowerEqualizerBandLevel);
dataset.updateValues(points);
chart.notifyDataUpdate();
}
代码示例来源:origin: h6ah4i/android-materialshadowninepatch
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.seekbar_translation_z:
if (fromUser) {
setItemsTranslationZ(progressToTranslationZAmount(progress));
}
break;
}
}
代码示例来源:origin: h6ah4i/android-materialshadowninepatch
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.seekbar_translation_z:
if (fromUser) {
setItemsTranslationZ(progressToTranslationZAmount(progress));
}
break;
}
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.drb_sb_max:
mVRating.setMax(6 + progress);
break;
case R.id.drb_sb_min:
mVRating.setMin(progress);
break;
}
}
代码示例来源:origin: mukeshsolanki/DrawingView-Android
@Override public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
int seekBarId = seekBar.getId();
if (seekBarId == R.id.pen_size_seekbar) {
drawingView.setPenSize(i);
} else if (seekBarId == R.id.eraser_size_seekbar) {
drawingView.setEraserSize(i);
}
}
代码示例来源:origin: yuyangXu0222/eBook
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
//在拖动时要随之改变屏幕亮度
if (seekBar.getId() == R.id.brightness_seek_bar) {
mSwitchView.setChecked(false);
ScreenBrightnessHelper.setBrightness(mContext, progress);
}
}
代码示例来源:origin: wuzhendev/android-wgallery
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.seekbar1:
gallery.setSelectedScale(0.8f + 0.1f * progress);
break;
case R.id.seekbar2:
gallery.setUnSelectedAlpha(progress * 1.f / 10);
break;
default:
break;
}
}
代码示例来源:origin: zxfnicholas/CameraSDK
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch){
int type = 0;
int vid=seekBar.getId();
if(vid==seekBar1){
//画笔
brush_progress=10-progress;
initBrush();
}
else if(vid==seekBar2){
//橡皮擦
eraser_progress=10-progress;
initEraser();
}
}
代码示例来源:origin: AlexMofer/ProjectX
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.wl_sb_horizontal:
mVContent.setHorizontalSpacing(
(int) (progress * getResources().getDisplayMetrics().density));
break;
case R.id.wl_sb_vertical:
mVContent.setVerticalSpacing(
(int) (progress * getResources().getDisplayMetrics().density));
break;
}
}
代码示例来源:origin: AlexMofer/WrapLayout
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.wly_sb_horizontal:
int horizontal = (int) (progress * getResources().getDisplayMetrics().density);
lytWrap.setHorizontalSpacing(horizontal);
break;
case R.id.wly_sb_vertical:
int vertical = (int) (progress * getResources().getDisplayMetrics().density);
lytWrap.setVerticalSpacing(vertical);
break;
}
}
代码示例来源:origin: stkent/PolygonDrawingUtil
@Override
public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) {
switch (seekBar.getId()) {
case R.id.corner_radius_seek_bar:
updateCornerRadius(progress);
break;
case R.id.rotation_seek_bar:
updateRotation(progress);
break;
case R.id.scale_seek_bar:
updateScale(progress);
break;
}
}
代码示例来源:origin: lovejjfg/Circle
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.pb_acceleration:
rippleView.setAcceleration(progress);
break;
case R.id.pb_cirRadius:
rippleView.setCirRadius(progress);
break;
case R.id.pb_multipleRadius:
rippleView.setMultipleRadius(progress);
break;
}
}
代码示例来源:origin: roomanl/AndroidDownload
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
switch (seekBar.getId()){
case R.id.play_audio_seek:
SystemConfig.getInstance().setStreamVolume(i);
break;
case R.id.play_brightness_seek:
SystemConfig.getInstance().setWindowBrightness(parentActivity,i);
break;
}
}
内容来源于网络,如有侵权,请联系作者删除!