设为首页 加入收藏

TOP

ProgressWheel:Android开源圆环进度条
2015-02-02 14:33:10 来源: 作者: 【 】 浏览:10
Tags:ProgressWheel Android 开源 圆环 进度

XML:


在你的attr.xml(res/value)中加入以下


?
? ? ?
? ? ?
? ? ?
? ? ?
? ? ?
? ? ?
? ? ? ?
? ? ? ?
? ? ?
? ? ?
? ?
? ?
? ?
? ?


在你的root view 中加入


xmlns:ProgressWheel="http://schemas.android.com/apk/res/com.visualdenim.schooltraq"


在你的xml合适的地方加入 组件


? ? android:id="@+id/pw_spinner"? ?
? ? android:layout_width="200dp"?
? ? android:layout_height="200dp"?
? ? android:layout_centerInParent="true"?
? ? ProgressWheel:text="Authenticating..."?
? ? ProgressWheel:textColor="#222"?
? ? ProgressWheel:textSize="14sp"?
? ? ProgressWheel:rimColor="#330097D6"?
? ? ProgressWheel:barLength="60dp"?
? ? ProgressWheel:barColor="#0097D6"?
? ? ProgressWheel:barWidth="5dp"?
? ? ProgressWheel:rimWidth="2dp"/>


你需要从layout中获得进度条,或者初始化


ProgressWheel pw = newProgressWheel(myContext, myAttributes);
ProgressWheel pw = (ProgressWheel) findViewById(R.id.pw_spinner);


使用.spin() 开始进度条滚动, .stopSpinning 停止进度条滚动


增加进度有点棘手,? 你可以调用.incrementProgress(), 但是这样就超过了360度, 因为一个圆有360度, 你超过360度就会自动重置, 一个百分百自动分配。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇经典(Java版)排序算法的分析及.. 下一篇Linux shell mac 地址转换 conver..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: