11[ ![ Android Gems] ( http://www.android-gems.com/badge/iwgang/CountdownView.svg?branch=master )] ( http://www.android-gems.com/lib/iwgang/CountdownView )
22[ ![ Android Arsenal] ( https://img.shields.io/badge/Android%20Arsenal-CountdownView-brightgreen.svg?style=flat )] ( http://android-arsenal.com/details/1/2641 )
3- [ ![ @iwgang ] ( https://img.shields.io/badge/微博 -%40iwgang-blue.svg )] ( http://weibo.com/iwgang )
3+ [ ![ @iwgang ] ( https://img.shields.io/badge/weibo -%40iwgang-blue.svg )] ( http://weibo.com/iwgang )
44
55#### [ English] ( https://github.com/iwgang/CountdownView/blob/master/README.md )
66
77
88# CountdownView
9- Android 倒计时控件 ,使用Canvas绘制,支持多种样式
9+ Android倒计时控件 ,使用Canvas绘制,支持多种样式
1010
11- ### screenshot
12- ![ ] ( https://raw.githubusercontent.com/iwgang/CountdownView/master/screenshot/screenshot.gif )
13- ![ ] ( https://raw.githubusercontent.com/iwgang/CountdownView/master/screenshot/screenshot2.png )
11+ [ 下载DemoAPK] ( https://raw.githubusercontent.com/iwgang/CountdownView/master/Demo_2.0.apk.apk )
1412
15- ### gradle
16- compile 'com.github. iwgang:countdownview:1.2'
13+ ### Screenshot
14+ ![ ] ( https://raw.githubusercontent.com/ iwgang/CountdownView/master/screenshot/g_main.gif )
1715
18- ### code
16+ ![ ] ( https://raw.githubusercontent.com/iwgang/CountdownView/master/screenshot/g_config.gif )
17+ ![ ] ( https://raw.githubusercontent.com/iwgang/CountdownView/master/screenshot/g_config2.gif )
18+
19+ <img src =" https://raw.githubusercontent.com/iwgang/CountdownView/master/screenshot/s_list.jpg " width =" 400px " height =" 650px " />
20+
21+ ### Gradle
22+ compile 'com.github.iwgang:countdownview:2.0'
23+
24+ ### Code
1925```
2026CountdownView mCvCountdownView = (CountdownView)findViewById(R.id.cv_countdownViewTest1);
2127mCvCountdownView.start(995550000); // 毫秒
@@ -26,7 +32,7 @@ for (int time=0; time<1000; time++) {
2632}
2733```
2834
29- ### layout
35+ ### Layout
3036``` xml
3137<cn .iwgang.countdownview.CountdownView
3238 android : layout_width =" wrap_content"
@@ -49,7 +55,7 @@ for (int time=0; time<1000; time++) {
4955 app : suffixMillisecond =" 毫秒" />
5056```
5157
52- ### customization
58+ ### Customization
5359 参数 | 类型 | 默认值
5460--- | --- | ---
5561isHideTimeBackground | boolean | true
@@ -88,8 +94,8 @@ suffixSecondLeftMargin | dimension | 0
8894suffixSecondRightMargin | dimension | 0
8995suffixMillisecondLeftMargin | dimension | 0
9096
91- ### 技巧
92- 1 . 多个CountdownView时,给每个指定值
97+ ### 其它
98+ * ** 多个CountdownView时,给每个指定值**
9399```
94100 // 第1步,设置tag
95101 mCvCountdownView.setTag(R.id.name, uid);
@@ -102,15 +108,15 @@ suffixMillisecondLeftMargin | dimension | 0
102108 }
103109 }
104110```
105- 2 . 动态显示/隐藏某些时间 (如:开始显示时、分、秒,后面到指定时间改成分、秒、毫秒)
111+ * ** 动态显示设置, 支持所有xml中的配置项来使用java代码设置 **
106112```
107- customTimeShow(boolean isShowDay, boolean isShowHour, boolean isShowMinute, boolean isShowSecond, boolean isShowMillisecond )
113+ dynamicShow(DynamicConfig dynamicConfig )
108114```
109- 3 . 倒计时结束后回调
115+ * ** 倒计时结束后回调**
110116```
111117 setOnCountdownEndListener(OnCountdownEndListener onCountdownEndListener);
112118```
113- 4 . 指定间隔时间回调
119+ * ** 指定间隔时间回调**
114120```
115121 setOnCountdownIntervalListener(long interval, OnCountdownIntervalListener onCountdownIntervalListener);
116- ```
122+ ```
0 commit comments