0

I am using the one seek bar In my Application and I set the one custom drawable (shape) to set thumb.

Following is my drawable(seekbar_circle_normal.xml) code snippet :

<item>
    <shape android:shape="rectangle" >
        <solid android:color="#FDC300" />
        <size
            android:height="16dp"
            android:width="16dp" />
        <padding 
            />
        <corners
            android:bottomLeftRadius="23dp"
            android:bottomRightRadius="23dp"
            android:topLeftRadius="23dp"
            android:topRightRadius="23dp" />
    </shape>
</item>
 <item>
    <shape android:shape="rectangle" >
        <corners
            android:bottomLeftRadius="23dp"
            android:bottomRightRadius="23dp"
            android:topLeftRadius="23dp"
            android:topRightRadius="23dp" />
        <gradient
            android:angle="270"
            android:endColor="#33B7E7"
            android:gradientRadius="1"
            android:startColor="#33B7E7" >
        </gradient>
        <size
            android:height="3dp"
            android:width="3dp" />
        <stroke
            android:width="0.5dp"
            android:color="#1DA6AE" />
    </shape>
</item> 

My xml file code as follows :

I wants to display the thumb in to the center of seek bar. How I can show this.

Thanks in advance.

V.P.
  • 592
  • 8
  • 20
  • Your questions has already been answered http://stackoverflow.com/questions/7404100/how-to-fix-seekbar-bar-thumb-centering-issues – Geert Weening Oct 09 '12 at 14:33

1 Answers1

3

you can find your answer at this. you need to set android:maxHeight and android:minHeight same. For ex

android:maxHeight="3dp"
android:minHeight="3dp"
Community
  • 1
  • 1
prateek
  • 858
  • 2
  • 10
  • 28