这是一个自定义Android组件,用于代替标准进度条组件。实现各种进度条样式,包括圆环,扫描等。
XML:
在你的attr.xml(res/value)中加入以下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<declare-styleable name= "ProgressWheel" >
<attr name= "text" format= "string" />
<attr name= "textColor" format= "color" />
<attr name= "textSize" format= "dimension" />
<attr name= "barColor" format= "color" />
<attr name= "rimColor" format= "color" />
<attr name= "rimWidth" format= "dimension" />
<attr name= "spinSpeed" format= "integer" />
<attr name= "circleColor" format= "color" />
<attr name= "radius" format= "dimension" />
<attr name= "barWidth" format= "dimension" />
<attr name= "barLength" format= "dimension" , Courier, monospace !important; line-height: 1.1em !important; font-size: 12px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; border-bottom-left-radius: 0px !important; background-image: none !important; border: 0px !
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
返回顶楼 | |