2013-05-30 234 views
0

我想創建一個自定義搜索欄,我需要在progressDrawable中放置一個圖像。但是,在大屏幕上,圖像重複出現。我如何填充此圖像。感謝您的解決方案。Android自定義搜索欄

這是我的視圖 http://s11.postimg.org/43wdr6xhf/seekbar.png

的SS,這是我的層列表

<item 
     android:id="@+android:id/SecondaryProgress" 
     android:left="0dp" 
     android:drawable="@drawable/feelingl"/> 
    <item 
     android:id="@+android:id/progress" 
     android:drawable="@drawable/whitebg"/> 

這是我的搜索欄;

<SeekBar 
      android:id="@+id/seekBar1" 
      android:layout_width="fill_parent" 
      android:layout_height="60dp" 
      android:indeterminate="false" 
      android:max="100" 
      android:paddingLeft="0dp" 
      android:paddingRight="0dp" 
      android:progress="0" 
      android:progressDrawable="@drawable/custom2" 
      android:rotation="180" 
      android:thumb="@android:color/transparent" /> 

回答

0

如果我理解你不想此圖片repat所以試試這個android:tileMode="disabled"