xml

新建=>xml=>values

<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.SeekBar.Normal" parent="@android:style/Widget.SeekBar">
<item name="android:maxHeight">8.0dip</item>
<item name="android:indeterminateOnly">false</item>
<item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
<item name="android:progressDrawable">@drawable/seekbar_horizontal</item> //下面的文件
<item name="android:minHeight">8.0dip</item>
<item name="android:thumb">@drawable/seek_thumb</item>
<item name="android:thumbOffset">10.0dip</item>
</style> </resources>

seekbar_horizontal.xml

文件要在res=>drawable目录下新建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/seek_bkg" />
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="2.0dip" />
<gradient android:startColor="#80ffd300" android:endColor="#a0ffcb00" android:angle="270.0" android:centerY="0.75" android:centerColor="#80ffb600" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip android:drawable="@drawable/seek" />
</item>
</layer-list>

使用方法main.xml

<SeekBar android:id="@+android:id/progresss"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_marginTop="50dip" style="@style/Widget.SeekBar.Normal" />

seek.9.png

seek_bkg.9.png


seek_thumb.png

最新文章

  1. php 上传文件
  2. java ZipOutputStream压缩文件,ZipInputStream解压缩
  3. c++控制台程序实现定时器
  4. [转]Informatica vs SSIS
  5. css元素position定位和z-index
  6. libthread_db
  7. 微信小程序-未接入app.json错误
  8. MySQL 网络访问连接
  9. 工厂方法模式的一些思考(java语法表示)
  10. styled-components解决全局样式&#39;injectGlobal&#39; 废除的问题
  11. Mac系统编译FFmpeg
  12. ORA-28000: the account is locked解决办法
  13. html取消回车刷新提交
  14. 在chrome Sources 页 显示 Console(drawer) 页
  15. CSS字体超出两行省略
  16. 查看SQL SERVER数据库的连接数
  17. RNN知识点
  18. docker swarm英文文档学习-5-在swarm模式中运行Docker引擎
  19. Docker应用之镜像
  20. 3.3 JSP内置对象概述

热门文章

  1. java中如何将byte[]里面的数据转换成16进制字符串
  2. SharePoint 中时间轴 Timeline的实现
  3. ASTER:An Attentional Scene Text Recognizer with Flexible Rectification
  4. 解决 p0sixspwn-v1.0.4 win版 无法定位程序输入点sqlite3_wal_checkpoint的问题
  5. docker-compose教程(安装,使用, 快速入门)
  6. unity, Gizmos.DrawMesh一个坑
  7. ELK收集mysql_slow.log
  8. JDK1.5新特性,基础类库篇,XML增强
  9. C++/C课程设计(2)工资管理系统功能说明
  10. 含有按钮的ScrollView在iOS8中无法滚动的解决办法 | ScrollView with UIControl/UIButton subviews not scrollable under iOS 8