1

My custom SeekBar looks bad. Thumb's vertical position not shown correctly. I have volum_control with 350x83 pixels size and volum_control_slide with 83x83 pixels size. I put them to drawable-hdpi folder.

<SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/seekbar"
    android:layout_width="350px"
    android:layout_height="183dp"
    android:progressDrawable="@drawable/volum_control"
    android:thumb="@drawable/volum_control_slide"
    android:max="100" />

How can I change thumbs position and how can I set android:layout_height parameter to real value? If I use 83px Seekbar looks cropped.

enter image description here

dimetil
  • 3,851
  • 2
  • 29
  • 47

1 Answers1

1

I found solution for vertical offset. I use android:minHeight and android:maxHeight parameters. But I still donn't know how to set real Seekbar size into xml without undercutting.

<SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/seekbar"
    android:layout_width="350px"
    android:layout_height="183dp"
    android:minHeight="75px"
    android:maxHeight="75px"
    android:progressDrawable="@drawable/volum_control"
    android:thumb="@drawable/volum_control_slide"
    android:max="100" />

enter image description here

dimetil
  • 3,851
  • 2
  • 29
  • 47
  • 1
    how did minheight and maxHeight change the position of your thumb vertically? it is not doing the same for me? – Sunny Dec 29 '13 at 18:04