2012-03-24 5 views

Antwort

4

Erstellen Sie Ihre eigenen ziehbar, zum Beispiel progressbar.xml und setzen android:progressDrawable="@drawable/progressbar attrubute auf Ihrem Fortschrittsbalken

Schreib in progressbar.xml ziehbar diesen Code:

<?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 android:src="@drawable/progressbar_bg" android:dither="true" /> 
    </item> 

    <item android:id="@android:id/progress"> 
     <clip> 
      <nine-patch android:src="@drawable/progressbar_body" android:dither="true" /> 
     </clip> 
    </item> 

</layer-list> 

und ersetzen @drawable/progressbar_bg und @drawable/progressbar_body mit Ihnen eigene 9 patch png Bilder

+0

I versuchte dies und der Fortschrittswert scheint in diesem Fall ignoriert zu werden. Es erscheint also immer bei 100%. Irgendwelche Vorschläge? – RaB

+0

ups, googling hilft http://stackoverflow.com/questions/7141469/android-seekbar-set-custom-style-using-nine-patch-images – RaB

Verwandte Themen