Troubleshoot thumb adjustment in the center of the arrow

I tried to change the width of the arrow and made it thin. But my thumb doesn't go to the search center. Thumb is a customized 9 patch image.

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
 >
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/relLayout"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
>
    <SeekBar 
        android:paddingLeft="60dp" 
        android:progressDrawable="@drawable/seekbar_progress" 
        android:progress="0" 
        android:layout_height="20dp" 
        android:layout_width="fill_parent" 
        android:id="@+id/frequency_slider" 
        android:max="1" 
        android:paddingRight="60dp" 
        android:minWidth="60dp"
        android:minHeight="60dp"
        android:layout_alignParentRight="true"

        android:thumb="@drawable/seek_normal_thumb" >
        </SeekBar>



</RelativeLayout>
<WebView  xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webkit"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/relLayout"
    android:layout_alignParentTop="true"
/>
</RelativeLayout>
+3
source share
2 answers

I got it right by specifying minHeight and maxHeight of the search string

+6
source

After defining an attribute with a large maxHeight:

android:maxHeight="1000dp"

SeekBar will be set to center

+5
source

All Articles