博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android倒计时 Android仿京东倒计时 android电商app源码倒计时源码
阅读量:7057 次
发布时间:2019-06-28

本文共 832 字,大约阅读时间需要 2 分钟。

countdown

一个简单的计时器

图片描述

提供了一些方法

设置margin

public void setLinearLayoutMargin(int left, int top, int right, int bottom)
public void setTextViewMargin(int left, int top, int right, int bottom)
设置Padding
public void setLinearLayoutPadding(int left, int top, int right, int bottom)
public void setTextViewPadding(int left, int top, int right, int bottom)
设置背景
public void setLinearLayoutDrawable(Drawable d)
public void setTextViewDrawable(Drawable d)
设置背景色
public void setLinearLayoutBgColor(int color)
public void setTextViewBgColor(int color)

xml中的一些方法

countdown:color_bg //设置背景色

countdown:color_text //设置字体颜色
countdown:text_size //设置字体大小
countdown:setDrawable //设置父容器背景
countdown:setDrawable_sub //设置子控件背景

怎么使用

xml中

android:layout_width="wrap_content"    android:layout_height="wrap_content"/>

Java中

setStopTime();//设置一个long类型的停止时间

源码详细地址:

转载地址:http://zywll.baihongyu.com/

你可能感兴趣的文章
Windows下的字体美化
查看>>
13.9. Health Status
查看>>
Unable to execute dex: Multiple dex files define Lcom/kenai/jbosh/AbstractAttr
查看>>
微信小程序明星开发者博卡君专访
查看>>
什么是 Help Desk?
查看>>
【MySQL】Tokudb安装测试初探
查看>>
12C打补丁的简单尝试
查看>>
分割excel sheet
查看>>
CentOS 7 yum方式快速安装MongoDB
查看>>
C#身份证识别相关技术
查看>>
【单片机】基于有方GPRS的智能电梯控制系统
查看>>
基于spring-boot的rest微服务框架
查看>>
微信公众平台开发最佳实践(第2版)
查看>>
Maven 依赖 spring-web 对战 spring-webmvc
查看>>
用了一天的时间,linux下expect实现ssh自动登录服务器记,鄙视下网上各种抄来抄去残段子...
查看>>
青岛市李沧区搭建人才大数据平台
查看>>
Linux下自动化监控内存、存储空间!
查看>>
iOS 7 表视图顶部空白解决
查看>>
中科院院士姚期智:我们已经来到量子时代的最后一里路
查看>>
“前.NET Core时代”如何实现跨平台代码重用 ——程序集重用
查看>>