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

2019-12-10 19:50:30丽君
  • android:angle="270"  />  
  • </shape>   </clip>  
  • </item>   </layer-list>  

     

     
    1. <?xml version="1.0" encoding="utf-8"?>   <!-- Copyright (C) 2008 The Android Open Source Project  
    2. Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.  
    3. You may obtain a copy of the License at   http://www.easck.com/licenses/LICENSE-2.0  
    4. Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,  
    5. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and  
    6. limitations under the License.   --> 
    7. <layer-list xmlns:android="http://www.easck.com/apk/res/android">   <item android:id="@android:id/background">  
    8. <shape>   <corners android:radius="5dip" />  
    9. <gradient  android:startColor="#ff9d9e9d" 
    10. android:centerColor="#ff5a5d5a"  android:centerY="0.75"