Android SeekBar 进度条 沙漏 加载条
来源:互联网 发布:大数据的处理流程 编辑:程序博客网 时间:2024/05/01 01:44
<SeekBar android:id="@+id/seek" android:layout_width="300px" android:layout_height="wrap_content" android:max="100" android:progress="50" android:progressDrawable="@drawable/seekbar_img" android:thumb="@drawable/thumb" />圆形进度条 <ProgressBar android:id="@+id/progressBar1" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" />条形 进度条 <ProgressBar android:id= "@+id/progressBar1" style= "?android:attr/progressBarStyleHorizontal" android:layout_width= "wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:max= "100" android:progress= "70" />精度条seebar_img.xml<?xml version="1.0" encoding= "utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 背景条 --> <item android:id="@+android:id/background" android:drawable="@drawable/bg" /> <!--二级精度条 --> <item android:id="@+android:id/SecondaryProgress" android:drawable="@drawable/bg" /> <!-- 一级进度条 --> <item android:id="@+android:id/progress" android:drawable="@drawable/bg2" /></layer-list>进度条的buttonthumb.xml<?xml version="1.0" encoding= "UTF-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 按下状态 --> <item android:state_pressed="true" android:drawable="@drawable/bg3" /> <!-- 普通无焦点状态 --> <item android:state_focused="false" android:state_pressed= "false" android:drawable="@drawable/bg4" /></selector>gif 动画 加载条。1、创建动画 文件夹 anim loading.xml<?xml version= "1.0" encoding ="UTF-8"?><animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android" > <item android:duration="150" android:drawable= "@drawable/xiu0" /> <item android:duration="150" android:drawable= "@drawable/xiu1" /> <item android:duration="150" android:drawable= "@drawable/xiu2" /> <item android:duration="150" android:drawable= "@drawable/xiu3" /></animation-list>2、在style中创建style 使用 indeterminateDrawable属性 设置 上面的动画。<?xml version= "1.0" encoding ="UTF-8"?><resources> <style name= "animStyle" parent ="@android:style/Widget.ProgressBar.Large"> <item name= "android:indeterminateDrawable" >@anim/loading</item> </style></resources>3、在progress 中设置style 为上个style的名字。 <ProgressBar android:id="@+id/ProgressBar01" style="@style/animStyle" android:layout_width="128px" android:layout_height ="128px"></ ProgressBar>
0 0
- Android SeekBar 进度条 沙漏 加载条
- Android 控件seekbar进度条、ratingbar星星平分条
- Android 控件seekbar进度条、ratingbar星星评分条
- Progressbar、SeekBar进度条,滚动条
- android 自定义进度条 seekbar
- android 自定义进度条 seekbar
- Android-SeekBar(拖动进度条)
- Android--进度条--ProgressBar--SeekBar
- android 拖动条 SeekBar
- Android SeekBar拖动条
- android 拖动条(SeekBar)
- android SeekBar 拖动条
- Android:拖动条SeekBar
- Android SeekBar拖动条
- Android SeekBar(拖动条)
- 008 ProgressBar进度条 SeekBar拖动条
- android 进度条seekbar样式自定义
- android 进度条seekbar样式自定义
- Android下载完成更新后,闪退,并没有打开安装成功界面
- java 基础 static关键字
- css - position
- 项目编译不成功原因之一的引用jar包问题
- 数组名和指针的关系辨析
- Android SeekBar 进度条 沙漏 加载条
- 设备的物理地址与蓝牙地址不同
- Java compiler level does not match解决方法
- 2.栈和队列的基本概念
- Android Bootstrap的使用
- 如何使用GitHub for Mac
- HttpServletResponse.sendRedirect()与RequestDispatcher.forward()的区别
- 用apache反向代理解决单外网ip对应内网多个web主机的问题
- Hbase单机版Docker镜像制作