Android编程实现自定义进度条颜色的方法

2019-12-10 19:50:30丽君
  • android:endColor="#ff747674"  android:angle="270" 
  • />   </shape>  
  • </item>   <item android:id="@android:id/secondaryProgress">  
  • <clip>   <shape>  
  • <corners android:radius="5dip" />   <gradient 
  • android:startColor="#80ffd300"  android:centerColor="#80ffb600" 
  • android:centerY="0.75"  android:endColor="#a0ffcb00" 
  • android:angle="270"  />  
  • </shape>   </clip>  
  • </item>   <item android:id="@android:id/progress">  
  • <clip>   <shape>  
  • <corners android:radius="5dip" />   <gradient 
  • android:startColor="#ffffd300"  android:centerColor="#ffffb600" 
  • android:centerY="0.75"  android:endColor="#ffffcb00" 
  • android:angle="270"  />  
  • </shape>   </clip>  
  • </item>   </layer-list>  

    看到没有,这是系统的进度条画出的布局条件

     

     
    1. android:startColor="#80ffd300"  android:centerColor="#80ffb600" 
    2. android:endColor="#ff747674"