iwgang / countdownview Goto Github PK
View Code? Open in Web Editor NEWAndroid Countdown View
License: MIT License
Android Countdown View
License: MIT License
只显示小时:分钟:秒 没计算 天数*24的小时数, 如果小时为三位以上数字时,显示不全,背景不能自由包裹内容似的缩放
i.e. 9
rather than 09
.
使用的是recycleview,显示倒计时时,如果对其中一个条目做删除操作,下面已经为0的倒计时会出现复用上一条的时间,时间静止的情况。请问这是什么情况呢?谢谢
我使用了边框,天数是三位,天数下面的横线就会消失,这个如何解决?
DynamicConfig constructor is a private access , so I can't get a instance , I want to config DynamicShow , due to countDownView.dynamicShow() method need a DynamicConfig type parameter,can you update DynamicConfig constructor permission modifier is public ?
Hi, thanks for your great library.
I want show some time in my application and i want when lasted 5s show me toast.
For example : I want how 17s countTimer, when this timer receive to 5s show me toast "just 5s".
how can i it? please help me
My recycler view items each contain countdowns.
When an item goes out of view, the countdowns pause at the exact time they went from visible to not visible.
My recycler view doesn't always retrigger my onBind's depending on how many list items it caches.
It looks like this library stops the countdown on detachment, but doesn't restart it on re-attachment.
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
stop();
}
Is there a way to set isHideTimeBackground as false dynamically other than setting the same via xml ????
My requirement is to dynamically create the Countdown view. Figured out everything dynamically except isHideTimeBackground.
我项目中就一个textview需要一个倒计时,之前自己用写的转换成天时分秒后也会跳两秒,就是一次性会减掉两秒,我设置的是1秒,后来把你项目中的CustomCountDownTimer拷过来之后还是一样会跳两秒,这个怎么解决?
1,背景支持渐变的颜色吗?或者用个图片
2,倒计时中间那条横线怎么去掉?
请大神赐教
How it's possible to convert a date dd/MM/yyyy to set it into a countdown
i tried several examples with converting the date to milliseconds and make it as input for this method
but it returns a randomly generated number while the milliseconds are 1000% correct
Please give me a way to solve this problem asap
多次调用start方法,有时候倒计时是停止的
please check your project with value : 1486987061090
this return 17209 days! I mean is 12 days !
how can i set timeBgBorderColor with java codes ?
嵌套的recyclerview适配器已经跟作者适配器维护时间一样的方法
1.当我在RecyclerView页面的第一个item有一个定时器的时候(其他item没有),我滑动到下面不可视的状态,定时器会停止走动!!!(当然因为你这边都是有定时器的,所以你这边的demo会出现复用的问题!!)
Hello,
Thank you for this great job keep it up.
I would like to ask if there is a way to change the font without adding the library to my project and thx.
Best.
如果我设置了RecyclerView的第一个item有个定时器,当我下滑到第二页的时候,第一个item的定时器时间结束了不会调用setOnCountdownEndListener方法么 ??
finished with non-zero exit value 2
在listview里可以用吗
假设已经为mCvCountdownView设置了OnCountdownIntervalListener的间隔时间监听器。mCvCountdownView在调用stop()以后,再次调用start()方法启动的话,很可能不会回调onInterval()方法,因为对象的成员变量mPreviouIntervalCallbackTime在stop()以后并没有被置零。解决办法是在stop()以后将之置零;或者增加一个set方法,在再次start之前置零。
另外这个倒计时很好用,谢谢!
您好作者,在RecyclerView中使用倒计时的时候,上下滑动 倒计时会暂停 ,多滑动几次就,变成0了,下拉刷新 时间又重置了,怎么解决这个问题啊 ,我Adapter继承的是BaseQuickAdapter com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.15这个里面的BaseAdapter
My recycler view items each contain countdowns.
When this recycler view Scrolling Fast and an item with countdowns goes out of view, then scroll back, the countdowns show allZero(00:00:00).But when this recycler view Scrolling Slow,the item with countdowns is normal. What a wonder!
比如本来转换成的时间是 00天23时12分24秒,但天数为0,我想要只显示一个0就够了,就是0天23时12分24秒,有这个属性设置吗?或者其他方法
这是为什么
Since this Handler is declared as an inner class, it may prevent the outer class from being garbage collected. If the Handler is using a Looper or MessageQueue for a thread other than the main thread, then there is no issue. If the Handler is using the Looper or MessageQueue of the main thread, you need to fix your Handler declaration, as follows: Declare the Handler as a static class; In the outer class, instantiate a WeakReference to the outer class and pass this object to your Handler when you instantiate the Handler; Make all references to members of the outer class using the WeakReference object.
Nice work !
Please provide an option for setting the custom typeface
Thanks In Advance
我的倒计时只有5s钟,倒计时 05s ,04s这种感觉很别扭
出现负时间的问题。。。出现负时间UI错乱不好看。。
如果手机在RV倒计时的页面后,回到后台调节本地时间会出现时间增加和时间减少的情况
how i can change the text and background color of countdownview ?
RT
我浏览了之前的
Issue
, 一些倒计时停止的现象,估计是未维护自己的Timer
。
我想提个PR
, 给它加一个onAttachedToWindow()
再开启自动定时,这样用户不会感到困扰~
同时也复用了控件中已有的Timer
。
// in CountdownView.java
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
stop();
}
看代码 不写for循环 或者只写mCvCountdownView.updateShow(1);
没有任何影响也会倒计时。
请问这个倒计时逻辑是否是必须的还是试用某种情形。
CountdownView mCvCountdownView = (CountdownView)findViewById(R.id.cv_countdownViewTest1);
mCvCountdownView.start(995550000); // 毫秒
// 或者自己编写倒计时逻辑,然后调用updateShow来更新UI
for (int time=0; time<1000; time++) {
mCvCountdownView.updateShow(time);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.