Skip to content Skip to sidebar Skip to footer

How To Get The Step Value Selected In Android-comboseekbar-master

I created a comboseekbar using the library android-comboseekbar-master. And i implemented the xml and code
mSeekBar.setOnItemClickListener(newOnItemClickListener() {

   @OverridepublicvoidonItemClick(AdapterView<?> parent, View view,
     int position, long id) {
    // TODO Auto-generated method stub
    toast(position + "");
    switch (position) {
    case0:

    //do something herebreak;
    case1:
    //do something herebreak;
    case2:
     //do something herebreak;
    case3:
    //do something herebreak;
    case4:
     //do something herebreak;
    case5:
     //do something herebreak;
    }

   }
  });

Solution 2:

ComboSeekBar extends Seekbar, so I think something like this should works:

mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        // progress is your value
    }
    @Override
    public void onStartTrackingTouch(SeekBar p_seekBar) {}
    @Override
    public void onStopTrackingTouch(SeekBar p_seekBar) {}
});

Post a Comment for "How To Get The Step Value Selected In Android-comboseekbar-master"