Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SeekBar thumb Customization

I want to hide bar and only want to show thumb. I did it with max-height=0dip but it did not completely work. I also want to set text on thumb and create thumb with multiple images. For example thumb which i button like image and has text and this button has tail downword, which increases with row increment.

like image 559
Ahmed Abdullah Saeed Avatar asked Feb 13 '11 11:02

Ahmed Abdullah Saeed


People also ask

How do I change the color of my SeekBar line in Android?

If you are using default SeekBar provided by android Sdk then their is a simple way to change the color of that . just go to color. xml inside /res/values/colors. xml and change the colorAccent.

How can I make my own SeekBar?

Now go to the activity_main. xml create a layout and inside the layout add a SeekBar. Specify the height width of SeekBar and the max progress that you want to use set progress to 0. This will create a customized Seekbar inside activity_main.


1 Answers

Regarding removing the background, I managed to do this in the following way. Here, the blank drawable is a transparent png of 1x1 pixel

    <SeekBar
        android:id="@+id/bar"
        android:layout_width="fill_parent"
        android:layout_height="30dip"
        android:progressDrawable="@drawable/blank"
     />

You can also change the drawable by using:

android:thumb="@drawable/icon"

To add text, I guess you'll have to create a custom component

like image 115
Arve Avatar answered Sep 19 '22 02:09

Arve