我正在开发一个应用程序,我在使用seekbar。我的seekbar的最大值是6,即android:max =“6”,因为我想间隔为5.我的问题是seekbar没有达到最终我尝试了很多东西,但仍然无助,所以任何人都可以建议我该怎么做。 我的代码是seekbar没有达到最后
public class MainActivity extends Activity implements SeekBar.OnSeekBarChangeListener
{
SeekBar seekBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
seekBar=(SeekBar)findViewById(R.id.seek);
int max = 6;
seekBar.setMax(max);
seekBar.setProgress(0);
seekBar.setOnSeekBarChangeListener(this);
}
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
}
public void onStartTrackingTouch(SeekBar seekBar) {
// Notify that the user has started a touch gesture.
}
public void onStopTrackingTouch(SeekBar seekBar) {
// Notify that the user has finished a touch gesture.
}
}
感谢
你能更清楚吗?这是什么意思:“seekbar没有达到最终结果”? – Kristopher