本文整理汇总了Java中android.widget.SeekBar.getId方法的典型用法代码示例。如果您正苦于以下问题:Java SeekBar.getId方法的具体用法?Java SeekBar.getId怎么用?Java SeekBar.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.SeekBar
的用法示例。
在下文中一共展示了SeekBar.getId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
switch (seekBar.getId()) {
case R.id.ball_count_controller_sb:
mBinding.ballCountControllerTv.setText(getResources().getString(R.string.ball_count_title) + " " + progress);
mBinding.testQueuedProgressbar.setTotalBalls(progress);
break;
case R.id.radius_controller_sb:
mBinding.radiusControllerTv.setText(getResources().getString(R.string.radius_title) + " " + progress);
mBinding.testQueuedProgressbar.setBallRadius(progress);
break;
case R.id.speed_controller_sb:
mBinding.speedControllerTv.setText(getResources().getString(R.string.speed_title) + " " + progress);
mBinding.testQueuedProgressbar.setIntervalValue(progress);
break;
default:
break;
}
}
示例2: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
switch (seekBar.getId()){
case R.id.seekBar1:
round.setText(i + "");
builder.setRound(i);
break;
case R.id.seekBar2:
if(i > 0){
fps.setText(i + "");
builder.setFPS(i);
}
break;
case R.id.seekBar3:
if(i > 0){
duration.setText((float)(i * 0.5) + "");
builder.setDuration(i * 500);
}
break;
}
}
示例3: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mProgress = progress;
if (seekBar.getId()==R.id.app_video_voiceSeekBar){
onVolumeSlide((float)progress/(float)seekBar.getMax());
mVoicebar.setProgress(progress);
} else if (seekBar.getId()==R.id.detailplayer_lightbar){
onBrightnessSlide((float)progress/(float)seekBar.getMax());
}else if (seekBar.getId()==R.id.detailplayer_danmutransbar){
curDanmuTrans = (100-progress)/100f;
mDanmuTransbar.setProgress(progress);
$.id(R.id.app_video_textdanmutrans).text(progress + "%");
log.i("pro123", curDanmuTrans + "");
}else if(seekBar.getId()==R.id.detailplayer_danmuspeedbar){
mDanmuSpeedbar.setProgress(progress);
if (progress>=0&&progress<10){
$.id(R.id.app_video_textdanmuspeed).text("慢");
}else if (progress>=10&&progress<20){
$.id(R.id.app_video_textdanmuspeed).text("中");
}else if (progress>=20&&progress<=30){
$.id(R.id.app_video_textdanmuspeed).text("快");
}
curDanmuSpeed = (100-progress)/100f;
if (curDanmuSpeed>1){
curDanmuSpeed = 1f;
}
if (curDanmuSpeed<0.7){
curDanmuSpeed = 0.7f;
}
log.i("curDanmuSpeed123", curDanmuSpeed + "");
}
}
示例4: onStartTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
if (seekBar.getId()==R.id.app_video_voiceSeekBar){
show(Integer.MAX_VALUE,false);
}
}
示例5: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar arg0, int value, boolean arg2) {
Log.d(THIS_FILE, "Progress has changed");
if(sipService != null) {
try {
float newValue = progressUnitToValue( value );
String key;
boolean useBT = sipService.getCurrentMediaState().isBluetoothScoOn;
int sId = arg0.getId();
if (sId == R.id.speaker_level) {
sipService.confAdjustTxLevel(0, newValue);
key = useBT ? SipConfigManager.SND_BT_SPEAKER_LEVEL : SipConfigManager.SND_SPEAKER_LEVEL;
SipConfigManager.setPreferenceFloatValue(this, key, newValue);
} else if (sId == R.id.micro_level) {
sipService.confAdjustRxLevel(0, newValue);
key = useBT ? SipConfigManager.SND_BT_MIC_LEVEL : SipConfigManager.SND_MIC_LEVEL;
SipConfigManager.setPreferenceFloatValue(this, key, newValue);
}
} catch (RemoteException e) {
Log.e(THIS_FILE, "Impossible to set mic/speaker level", e);
}
}else {
//TODO : revert changes here !
}
//Update quit timer
if(isAutoClose) {
delayedQuit(AUTO_QUIT_DELAY);
}
}
示例6: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b)
{
switch (seekBar.getId())
{
case R.id.sbBubbleRadius:
mBubbleLayout.setBubbleRadius(dpTopx(i));
break;
case R.id.sbLookPosition:
mBubbleLayout.setLookPosition(dpTopx(i));
break;
case R.id.sbLookWidth:
mBubbleLayout.setLookWidth(dpTopx(i));
break;
case R.id.sbLookLength:
mBubbleLayout.setLookLength(dpTopx(i));
break;
case R.id.sbShadowRadius:
mBubbleLayout.setShadowRadius(dpTopx(i));
break;
case R.id.sbShadowX:
mBubbleLayout.setShadowX(dpTopx(i));
break;
case R.id.sbShadowY:
mBubbleLayout.setShadowY(dpTopx(i));
break;
}
mBubbleLayout.invalidate();
}
示例7: onStopTrackingTouch
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
log.i("mProgress",mProgress+"");
if (seekBar.getId()==R.id.detailplayer_lightbar){
mLightbar.setProgress(mProgress);
}
if (seekBar.getId()==R.id.app_video_voiceSeekBar){
show(defaultTimeout,false);
}
}
示例8: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
switch (seekBar.getId()) {
case R.id.tolerance_seekbar: {
tolerance = i;
toleranceTextView.setText("Peak tolerance: " + tolerance + "%");
break;
}
case R.id.margin_error_seekbar: {
marginError = i;
marginErrorTextView.setText("Margin error : " + marginError + "%");
break;
}
}
}
示例9: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@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;
}
}
示例10: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int id = seekBar.getId();
if (seekBar == textStrokeSeekBar) {
textPreviewView.setTextStrokeRatio((float) progress / seekBar.getMax());
}
update();
}
示例11: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int id = seekBar.getId();
if (seekBar == outlineWidthSeekBar) {
textPreviewView.setOutlineRatio((float) progress / seekBar.getMax());
}
update();
}
示例12: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int id = seekBar.getId();
if (seekBar == shadowRadiusSeekBar) {
textPreviewView.setShadowRadius((float) progress / seekBar.getMax());
}
update();
}
示例13: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
int id = seekBar.getId();
if (seekBar == textSkewSeekBar) {
textPreviewView.setSkewX((float) (progress - seekBar.getMax() / 2) / seekBar.getMax() * 2);
} else if (seekBar == textLetterSpacingSeekBar) {
textPreviewView.setLetterSpacing((float) (progress - seekBar.getMax() / 2) / seekBar.getMax() * 2);
} else if (seekBar == textScaleXSeekBar) {
textPreviewView.setScaleX((float) progress / seekBar.getMax() + 0.5f);
} else if (seekBar == textLineSpacingSeekBar) {
textPreviewView.setLineSpacing((float) progress / seekBar.getMax() + 0.5f);
}
update();
}
示例14: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b)
{
if(seekBar.getId() == R.id.seekBar_space)
space = spaceSeekBar.getProgress();
else
line = lineSeekBar.getProgress();
refresh(cipherText, space, line);
}
示例15: onProgressChanged
import android.widget.SeekBar; //导入方法依赖的package包/类
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
editor = pref.edit();
value_temp = progress;
switch (seekBar.getId()) {
case seekBar3: {
editor.putInt("leftup", value_temp - 50);
tLeftup.setText(String.valueOf(value_temp - 50));
break;
}
case seekBar4: {
editor.putInt("leftdown", value_temp - 50);
tLeftdown.setText(String.valueOf(value_temp - 50));
break;
}
case seekBar5: {
editor.putInt("rightup", value_temp - 50);
tRightup.setText(String.valueOf(value_temp - 50));
break;
}
case seekBar6: {
editor.putInt("rightdown", value_temp - 50);
tRightdown.setText(String.valueOf(value_temp - 50));
break;
}
}
//text.layout((int) (progress * moveStep), 20, screenWidth, 80);
//text.setText(getCheckTimeBySeconds(progress, startTimeStr));
editor.commit();
}