您的位置:首页 > 移动开发 > Android开发

Android控件_ProgressBar使用

2015-12-21 18:44 274 查看
一、ProgressBar进度条简单认识:

进度条用颜色填充来表明进度完成的程度

通常用于向用户显示某个耗时操作完成的百分比

让用户感觉程序失去了相应,更好的用户体验。

二、Android支持的风格的进度条

例如:style=“@android:style/Widget.ProgressBar”

@android:style/Widget.ProgressBar

@android:style/Widget.ProgressBar.Horizontal 水平进度条

@android:style/Widget.ProgressBar.Inverse 普通大小进度条

@android:style/Widget.ProgressBar.Large 大进度条

@android:style/Widget.ProgressBar.Large.Inverse 大进度条(反转)

@android:style/Widget.ProgressBar.Small 小进度条

@android:style/Widget.ProgressBar.Small.Inverse 小进度条反转

例如:

style=”?android:attr/progressBarStyleSmall”

style=”?android:attr/progressBarStyleSmallInverse”

style=”?android:attr/progressBarStyleSmallTitle” 标题栏圆圈

style=”?android:attr/progressBarStyleLargeInverse”

style=”?android:attr/progressBarStyle”

style=”?android:attr/progressBarStyleInverse”

style=”?android:attr/progressBarStyleLarge”

style=”?android:attr/progressBarStyleLargeInverse”

style=”?android:attr/progressBarStyleHorizontal”

常用属性:

android:max 设置该进度条的最大值

android:progress 设置该进度条的已完成进度值

android:progressDrawable 设置该进度条的轨道的绘制形式

android:progressBarStyle 默认进度条样式

android:progressbarStyleHorizontal 水平进度条样式

android:progressBarStyleLarge 大进度条样式

android:progressbarStyleSmall 小进度条样式
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: