美文网首页
AndroidUi(5)-转动的圆环

AndroidUi(5)-转动的圆环

作者: C二叔 | 来源:发表于2016-09-21 15:39 被阅读0次

布局文件如下: rotate_ring.xml

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"    
android:fromDegrees="0"    
android:pivotX="50%"    
android:pivotY="50%"    
android:toDegrees="1080.0">    

<shape        
android:innerRadiusRatio="3"        
android:shape="ring"        
android:thicknessRatio="8"        
android:useLevel="false">   
     
<gradient            
android:endColor="#2F90BD"            
android:startColor="#FFFFFF"            
android:type="sweep" />    
</shape>

</rotate>

使用:

<ProgressBar    
android:layout_width="150dp"    
android:layout_height="150dp"    
android:layout_margin="8dp"    
android:indeterminate="false"   
android:indeterminateDrawable="@drawable/rotate_ring"    />

相关文章

网友评论

      本文标题:AndroidUi(5)-转动的圆环

      本文链接:https://www.haomeiwen.com/subject/lfyaettx.html