android:innerRadius 内部半径
android:thickness  厚度
gradient 渐变
android:useLevel="false"  取掉控件自带旋转效果
android:type="sweep"   渐变模式
rotate 旋转
    android:fromDegrees="0" 起始角度
android:pivotX="50%" 基于自身中心位置旋转
android:pivotY="50%"
android:toDegrees="360" 终止角度

<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="360" > <shape
android:innerRadius="15dp"
android:shape="ring"
android:thickness="3dp"
android:useLevel="false" >
<gradient
android:centerColor="#5f00"
android:endColor="#fff"
android:startColor="#f00"
android:type="sweep" />
</shape> </rotate>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingTop="10dp" > <ImageView
android:id="@+id/iv_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/common_listview_headview_red_arrow" /> <ProgressBar
android:id="@+id/pb_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="invisible"
android:indeterminateDrawable="@drawable/custom_progress" />
</FrameLayout> <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" > <TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="下拉刷新"
android:textColor="#f00"
android:textSize="17sp" /> <TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="2015-08-12 14:45"
android:textColor="#9e9e9e"
android:textSize="15sp" />
</LinearLayout> </LinearLayout>

android 项目学习随笔十(自定义ProgressBar)的更多相关文章

  1. android 项目学习随笔十八(三级缓存)

    xUtils的BitmapUtils模块用的就是三级缓存,在项目中尽量还是应用BitmapUtils 三级缓存(机制) import com.itheima.zhsh66.R; import andr ...

  2. android 项目学习随笔十四(WebView)

    1.布局文件 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:andro ...

  3. android 项目学习随笔十二(ListView加脚布局)

    1.ListView加脚布局 头布局initHeaderView,在onTouchEvent事件中进行显示隐藏头布局切换 脚布局initFooterView,实现接口OnScrollListener, ...

  4. android 项目学习随笔十六( 广告轮播条播放)

    广告轮播条播放 if (mHandler == null) {//在此初始化mHandler , 保证消息不重复发送 mHandler = new Handler() { public void ha ...

  5. android 项目学习随笔十九(MD5)

    import java.security.MessageDigest; public class MD5Encoder { public static String encode(String str ...

  6. android 项目学习随笔十五(ShareSDK开放平台)

    ShareSDK开放平台http://www.mob.com/#/

  7. android 项目学习随笔二十(屏幕适配)

    1.图片适配 放入相同名称的资源文件,机器根据不同分辨率找相近的资源 240*320 ldpi 320*480 mdpi 480*800 hdpi 720*1280 xhdpi 2.布局适配 在不同的 ...

  8. android 项目学习随笔十三(ListView实现ITEM点击事件,将已读状态持久化到本地)

    1.因为给LISTVIEW增加了两个头布局,所以在点击事件ITEM索引会增加2,比如原来第一条数据的索引应该为0,增加两个头布局后,它的索引变为        2,为了使LISTVIEW的ITEM在点 ...

  9. android 项目学习随笔十一(ListView下拉刷新提示)

    1. 设置mHeaderView.setPadding TOPPADING为负值,隐藏刷新提示头布局 在onTouchEvent事件中进行头布局显示隐藏切换 import java.text.Simp ...

随机推荐

  1. 安装Sql server 2008时出现sql server 2005 express tools failed 怎么办?

    提示错误:Sql2005SsmsExpressFacet 检查是否安装了 SQL Server 2005 Express 工具. 失败,已安装 SQL Server 2005 Express 工具.若 ...

  2. SQLServer User and Login Tips

    use master IF EXISTS (SELECT * FROM sys.databases WHERE name = 'gpdb83sp')BEGIN DROP DATABASE gpdb83 ...

  3. SDUT2165:Crack Mathmen(快速幂)

    题目:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2165&cid=1431 快速幂. #include <iostream> ...

  4. Linux就这个范儿 第13章 打通任督二脉

    Linux就这个范儿 第13章 打通任督二脉 0111010110……你有没有想过,数据从看得见或看不见的线缆上飞来飞去,是怎么实现的呢?数据传输业务的未来又在哪里?在前面两章中我们学习了Linux网 ...

  5. tomcat的部署

    零.服务器.Servlet容器.web容器 Servlet容器:能够运行Servlet的环境叫做Servlet容器 web容器:能够运行web应用的环境就叫做web容器 weblogic websph ...

  6. 通过 ec2-api / boto 调用 OpenStack 功能

    通过 ec2-api / boto 调用 OpenStack 功能 OpenStack 支持 amazon ec2 的 api,并能通过 python 库 boto 来进行调用.目前,社区在把 ec2 ...

  7. shell eval用法

    转自:http://blog.csdn.net/w_ww_w/article/details/7075867 eval可读取一连串的参数,然后再依参数本身的特性来执行.eval是shell内建命令,可 ...

  8. 随机数产生random

    随机数产生推荐用random(),在产生随机数前要添加种子srandom((unsigned int)time(NULL)). SYNOPSIS #include <stdlib.h> l ...

  9. MongoDB安装、管理工具、操作

    1. mongoDB安装.启动.关闭 1.1 下载安装包 wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.3.tgz 1.2 ...

  10. (转)在PHP语言中使用JSON

    原文 : http://www.ruanyifeng.com/blog/2011/01/json_in_php.html --------------------------------------- ...