Hello All,
I am looking for a seekbar like this image. I succeeded in setting background but problem is thumb and segments text below seek bar. Does anyone know solution Thank You
Hello All,
I am looking for a seekbar like this image. I succeeded in setting background but problem is thumb and segments text below seek bar. Does anyone know solution Thank You
Using this library here is a minimum example code that worked for me:
<com.infteh.comboseekbar.ComboSeekBar
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/seekbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
custom:color="#000"
custom:textSize="12sp"
custom:multiline="false"
/>
Then in the Activity
private ComboSeekBar mSeekBar;
List<String> seekBarStep = Arrays.asList("All","1","5","10","20");
mDistanceSeekBar.setAdapter(seekBarStep);
This will create a black segmented seekbar using default drawables. If you need to add some customization have a look at ComboSeekBar.onDraw(), CustomDrawable.draw() and CustomThumbDrawable.draw().
This project is all but finished but still a solid starting point. You probably will have to workout the drawables a bit more
I think you can just "fake it" by making some right adjustment to the images. The only problem would be that it should be length fixed, or at last you should do the text by coding.
Anyway with android:thumb="@drawable/seek_handler"
you can change the handler style of a seekbar. (See this Android SeekBar thumb Customization )
You can check this. This may give you some idea: custom seek bar
And its source code is here: Source code