Open GoogleCodeExporter opened 9 years ago
What does your setOnRangeSeekBarChangeListener do?
Also, are you seeing the range bar change at all or just an incorrect position?
Could you provide some sample values or code? What are the absolute max/min?
Original comment by grego...@gmail.com
on 12 Jul 2012 at 9:13
my setOnRangeSeekBarChangeListener does this:
curentSelectionLable.setText(minValue+" Euro - "+maxValue+" Euro");
min=minValue.intValue();
max=maxValue.intValue();
setValues()
It updates some values.
The range bar does not change at all on setSelectedMinValue and
setSelectedMaxValue
The solotion that I came out with is to read the rangebar each time I want to
set the selected values. I do that in the loadCurrent method (see below).
public class MoneyPicker extends SubFilterFrame {
RangeSeekBar<Integer> seekBar;
TextView curentSelectionLable;
int min, max;
public void setValues(){
curentFilter.pretMax=max;
curentFilter.pretMin=min;
}
public MoneyPicker(FilterInterface parentFilter, View self, Context c) {
super(parentFilter, self, c);
curentSelectionLable=(TextView)curentSubFilter.findViewById(R.id.k_pret_lable);
}
@Override
public void LoadCurent(FilterObject filter) {
super.LoadCurent(filter);
curentSelectionLable.setText(curentFilter.pretMin+" Euro - "+curentFilter.pretMax+" Euro");
if(MoneyPicker.this.curentFilter==null){
NSLog.l("double bummer");
}
LinearLayout layout = (LinearLayout) curentSubFilter.findViewById(R.id.k_pret_slider);
if(seekBar!=null){
layout.removeView(seekBar);
seekBar=null;
}
seekBar = new RangeSeekBar<Integer>(40, 2500, context,200,1000);
seekBar.setSelectedMaxValue(curentFilter.pretMax);
seekBar.setSelectedMinValue(curentFilter.pretMin);
min=curentFilter.pretMin;
max=curentFilter.pretMax;
seekBar.setOnRangeSeekBarChangeListener(new OnRangeSeekBarChangeListener<Integer>() {
public void onRangeSeekBarValuesChanged(RangeSeekBar<?> bar, Integer minValue, Integer maxValue) {
curentSelectionLable.setText(minValue+" Euro - "+maxValue+" Euro");
min=minValue.intValue();
max=maxValue.intValue();
setValues();
}
});
layout.addView(seekBar);
}
}
Original comment by obog...@gmail.com
on 12 Jul 2012 at 9:58
Original issue reported on code.google.com by
obog...@gmail.com
on 11 Jun 2012 at 12:42