2012-03-28 103 views
1

我想知道如何在搜索栏中调整大拇指尺寸。我已经使用minheight和maxheight完成了搜索栏的大小调整。但拇指保持相同的大小。我该怎么办?在seekbar中调整大拇指尺寸

+0

可能重复SeekBar?](http://stackoverflow.com/questions/3648311/how-do-i-get-the-thumb-of-an-android-seekbar-to-match-the-height-of-the- seekbar) – 2012-03-28 07:07:31

+0

[Make seekbar thumb hitbox larger]可能的重复(http://stackoverflow.com/questions/21005319/make-seekbar-thumb-hitbox-bigger) – parvus 2016-10-07 07:53:53

回答

1

您可以通过向SeekBar添加样式来更改缩略图的大小。 这里是风格:

<style name="CustomSeekbar" parent="Widget.AppCompat.SeekBar"> 
    <item name="colorAccent">#1D5368</item> 
    <item name="android:width">30dp</item> 
    <item name="android:height">30dp</item> 
</style> 

这里是你可以在你的布局中使用它的搜索栏:

<SeekBar 
    android:id="@+id/custom_seek_bar" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:theme="@style/CustomSeekbar" /> 
的[我如何获得一个Android搜索栏的拇指企及的高度