CountdownView倒计时

compile 'com.github.iwgang:countdownview:2.1.5'
<cn.iwgang.countdownview.CountdownView
            android:layout_marginLeft="10dp"
            android:layout_marginTop="5dp"
            android:id="@+id/cdm"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:timeBgRadius="5dp"
            app:timeBgColor="#000000"
            app:isHideTimeBackground="false"
            app:isShowDay="false"
            app:isShowHour="true"
            app:isShowMinute="true"
            app:isShowSecond="true"
            app:isShowMillisecond="false"
            app:timeTextColor="#FFFFFF"
            app:timeTextSize="8sp"
            app:isTimeTextBold="true"
            app:suffixGravity="center"
            app:suffixTextColor="#000000"
            app:suffixTextSize="12sp"
            />
CountdownView mCvCountdownView = (CountdownView)inflate.findViewById(R.id.cdm);
mCvCountdownView.start(995550000);
isHideTimeBackground    boolean true 隐藏倒计时背景
timeBgColor color   #444444 倒计时的背景色
timeBgSize  dimension   timeSize + 2dp * 4 倒计时背景大小
timeBgRadius    dimension   0 倒计时背景的圆角
isShowTimeBgDivisionLine    boolean true 倒计时的横向的分割线
timeBgDivisionLineColor color   #30FFFFFF 倒计时的横向的分割线颜色
timeBgDivisionLineSize  dimension   0.5dp 倒计时的横向的分割线高度
timeTextSize    dimension   12sp 倒计时的文字大小
timeTextColor   color   #000000 倒计时的文字颜色
isTimeTextBold  boolean false 倒计时文字所在的边框
isShowDay   boolean 自动显示 (天 > 1 显示, = 0 隐藏)
isShowHour  boolean 自动显示 (小时 > 1 显示, = 0 隐藏)
isShowMinute    boolean true 是否显示分钟
isShowSecond    boolean true 是否显示秒
isShowMillisecond   boolean false 是否显示毫秒
suffixTextSize  dimension   12sp 添加的分号:的大小
suffixTextColor color   #000000 添加的分号:的颜色
isSuffixTextBold    boolean false 添加的分号:的边框
suffixGravity   'top' or 'center' or 'bottom'   'center' 添加的分号:对齐方式
suffix  string  ':' 添加的分号:默认值
suffixDay   string  null 天默认值
suffixHour  string  null 时默认值
suffixMinute    string  null 分默认值
suffixSecond    string  null 秒默认值
suffixMillisecond   string  null 毫秒默认值
suffixLRMargin  dimension   left 3dp right 3dp 间距默认左右各3dp
suffixDayLeftMargin dimension   0
suffixDayRightMargin    dimension   0
suffixHourLeftMargin    dimension   0
suffixHourRightMargin   dimension   0
suffixMinuteLeftMargin  dimension   0
suffixMinuteRightMargin dimension   0
suffixSecondLeftMargin  dimension   0
suffixSecondRightMargin dimension   0
suffixMillisecondLeftMargin dimension   0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值