android 的seekbar 的自定義樣式網上有很多例子了, 我是這么寫的
<SeekBar android:id="@+id/sbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:splitTrack="false" android:progress="20" android:progressDrawable="@drawable/seekbarbg" android:thumb="@drawable/seekbarthumb" android:layout_marginLeft="10dp"/>
android:thumb 是兩張圖片組合成的一個drawable , 按上去的時候會有變化,這里就不展示了。 但是卻出現了一個問題,
thumb的圖片背景其實是透明的, 但是這里卻多了背景出來,而且這里的背景的顏色其實是整個后面的大背景的顏色。
找了好久不知道問題在哪里, 后來在stackflow 里找到答案, 加上一句
android:splitTrack="false" 就可以了。 暈倒