[Android] 기본 위젯 테스트 - 슬라이드바(SeekBar)
Android SeekBar 테스트 실행 화면
SeekBar seekBar;
seekBar = (SeekBar) findViewById(R.id.seekBar1);
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()
{
public void onStartTrackingTouch(SeekBar seekBar)
{
}
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
{
//SeekBar 값 표시
ctlText1.setText("PWM:"+progress+"%");
}
public void onStopTrackingTouch(SeekBar seekBar)
{
}
});
seekBar = (SeekBar) findViewById(R.id.seekBar1);
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener()
{
public void onStartTrackingTouch(SeekBar seekBar)
{
}
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
{
//SeekBar 값 표시
ctlText1.setText("PWM:"+progress+"%");
}
public void onStopTrackingTouch(SeekBar seekBar)
{
}
});
Android SeekBar 테스트 실행 화면
반응형