2016-01-08 102 views
3

關於最後的小事情的任何想法是?如果我將進度設置爲0並刪除拇指,則左側是相同的。 我注意到這是拇指在極右端(也是左邊)的地方,但我似乎無法將其移除。自定義Seekbar四肢問題

enter image description here

這是我使用的XML:

<?xml version="1.0" encoding="utf-8"?> 
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item android:id="@android:id/background"> 
     <nine-patch 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:dither="true" 
      android:src="@drawable/filler_bar_bckgnd_white" 
      /> 
    </item> 
    <item android:id="@android:id/secondaryProgress"> 
     <clip> 
      <bitmap 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       android:src="@drawable/filler_bar_bckgnd_green" 
       /> 
     </clip> 
    </item> 
    <item 
     android:id="@android:id/progress"> 
     <clip> 
      <bitmap 
       xmlns:android="http://schemas.android.com/apk/res/android" 
       android:src="@drawable/filler_bar_bckgnd_green" 
       /> 
     </clip> 
    </item> 
</layer-list> 

而且我設置它像這樣:

 <SeekBar 
      android:id="@+id/my_seekbar" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:max="100" 
      android:progress="40" 
      android:progressDrawable="@drawable/seekbar_progress" 
      android:thumb="@drawable/filler_bar_icon" /> 

這些都是使用的圖像:

enter image description here

​​

enter image description here


+0

嘗試改變機器人:抖動=「真正的」 T爲'FALSE' – piotrek1543

回答

0

其實我已經發現了這個問題。問題在於9patch圖像。我與它玩耍了,似乎我應該這樣做它:

enter image description here