progressbar
我已经定义接受评级RATINGbar = (SeekBar)findViewById(R.id.RATINGseekBarID); // make seekbar object
RATINGbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
// TODO Auto-generated method stub
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
// TODO Auto-generated method stub
RATINGtextProgress = (TextView)findViewById(R.id.RATINGtextViewProgressID);
RATINGtextProgress.setText("Rating:: "+progress);
seekBar.setMax(5);
}
});
1-2-3-4-5
1
- 1.5
- 2
- 2.5
- 3
- 3.5
- 4
- 4.5
- {{ 1}} 如何使我的进度条接受5
希望我很清楚
答案 0 :(得分:1)
答案 1 :(得分:1)
您无法将ProgressBar
间隔更改为浮动。相反,请尝试使用RatingBar
。