Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Android倒计时 Android仿京东倒计时 Android商城倒计时

Notifications You must be signed in to change notification settings

zyAndroid/countdown

Repository files navigation

countdown

一个简单的计时器

image

提供了一些方法

 设置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中
 
 <com.zy.lib.countdown.CountDownView 
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"/>
 
 Java中
 
 setStopTime();//设置一个long类型的停止时间
 

开源不易,欢迎star

About

Android倒计时 Android仿京东倒计时 Android商城倒计时

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /