0

I want to make a custom seekbar whose dots become black after passing that level like this... http://s9.postimg.org/ib3iyg73z/requ.png

Ali Ilyas
  • 1
  • 2

2 Answers2

0

You can use https://github.com/karabaralex/android-comboseekbar For your requirement .Its similar to your Desire Output .

Please have a look here

How to make segmented seekbar/slider look like following?

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

You can pass to the seekbar the bitmap to display and change it depending on the level.

Define the listener

private OnSeekBarChangeListener mOnSeekBarChangeListener = new OnSeekBarChangeListener() {
...

  @Override
  public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
     Bitmap bitmap;
     if( int <= 0 )
       bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.whitecircle);
     else
       bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.blackcircle);

     ThumbBitmapDrawable th = new BitmapDrawable(context.getResources(), bitmap);
     seekBar.setThumb(th);
  }

attach the listener to your seekbar

theSeekBar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);