2012-03-28 105 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搜索欄的拇指企及的高度