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


Java SeekBar.getId方法代码示例

本文整理汇总了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;
    }
}
 
开发者ID:trdevendran,项目名称:queued-progressbar,代码行数:21,代码来源:MainActivity.java

示例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;
    }
}
 
开发者ID:BullyBoo,项目名称:TextCounter,代码行数:22,代码来源:MainActivity.java

示例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 + "");
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:40,代码来源:GiraffePlayer.java

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

}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:8,代码来源:GiraffePlayer.java

示例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);
	}
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:32,代码来源:InCallMediaControl.java

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

示例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);
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:13,代码来源:GiraffePlayer.java

示例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;
        }
    }
}
 
开发者ID:GRnice,项目名称:PandwarfDefenderProject,代码行数:16,代码来源:GuardianFragment.java

示例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;
    }
}
 
开发者ID:stkent,项目名称:PolygonDrawingUtil,代码行数:15,代码来源:MainActivity.java

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

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

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

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

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

示例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();
}
 
开发者ID:hgs1217,项目名称:Paper-Melody,代码行数:32,代码来源:PositonCalibrationActivity.java


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