All Projects → mo0n1andin → Countdowntask

mo0n1andin / Countdowntask

Licence: apache-2.0
⌛️A countdown library for Android.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Countdowntask

Placeholderview
This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
Stars: ✭ 2,104 (+3187.5%)
Mutual labels:  recyclerview, listview, gridview
Imageviewer
🔮图片浏览器,支持图片手势缩放、拖拽等操作,`自定义View`的模式显示,自定义图片加载方式,更加灵活,易于扩展,同时也适用于RecyclerView、ListView的横向和纵向列表模式,最低支持版本为Android 3.0及以上...
Stars: ✭ 363 (+467.19%)
Mutual labels:  recyclerview, listview, gridview
Overscroll Decor
Android: iOS-like over-scrolling effect applicable over almost all scrollable Android views.
Stars: ✭ 2,671 (+4073.44%)
Mutual labels:  recyclerview, listview, gridview
Adapter
A quick adapter library for RecyclerView, GridView, ListView, ViewPager, Spinner
Stars: ✭ 376 (+487.5%)
Mutual labels:  recyclerview, listview, gridview
Superadapter
[Deprecated]. 🚀 Adapter(BaseAdapter, RecyclerView.Adapter) wrapper for Android. 一个Adapter同时适用RecyclerView、ListView、GridView等。
Stars: ✭ 638 (+896.88%)
Mutual labels:  recyclerview, listview, gridview
jh-weapp-demo
微信小程序项目- 实现一些常用效果、封装通用组件和工具类
Stars: ✭ 60 (-6.25%)
Mutual labels:  listview, utils, gridview
android-page
android 分页列表数据加载引擎,主要封装了android分页列表数据加载的各个组件,如果你有一个需要分页加载的List列表,都可以使用此框架实现。
Stars: ✭ 15 (-76.56%)
Mutual labels:  listview, recyclerview, gridview
Giraffeplayer2
out of the box android video player(support lazy load, ListView/RecyclerView and hight performance)
Stars: ✭ 344 (+437.5%)
Mutual labels:  recyclerview, listview
Recyclerlistview
High performance listview for React Native and web!
Stars: ✭ 4,033 (+6201.56%)
Mutual labels:  recyclerview, listview
React Countdown
React Component showing a countdown to certain date and time.
Stars: ✭ 58 (-9.37%)
Mutual labels:  timer, countdown
Flutter Layouts Exampls
Layout of the flutter example.such as Row,Comlun,listview,Just for learning.
Stars: ✭ 292 (+356.25%)
Mutual labels:  listview, gridview
React Native Ultimate Listview
A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row.
Stars: ✭ 497 (+676.56%)
Mutual labels:  listview, gridview
Ultimaterefreshview
UltimateRefreshView 实现下拉刷新,上拉加载更多的轻量级库;支持RecyclerView ,ListView ,ScrollView & WebView
Stars: ✭ 64 (+0%)
Mutual labels:  recyclerview, listview
Multi type list view
A flutter customer ListView that displays multiple widget types.
Stars: ✭ 47 (-26.56%)
Mutual labels:  recyclerview, listview
Swipedelmenulayout
The most simple SwipeMenu in the history, 0 coupling, support any ViewGroup. Step integration swipe (delete) menu, high imitation QQ, iOS. ~史上最简单侧滑菜单,0耦合,支持任意ViewGroup。一步集成侧滑(删除)菜单,高仿QQ、IOS。~
Stars: ✭ 3,376 (+5175%)
Mutual labels:  recyclerview, listview
Brv
Android上最强大的RecyclerView库
Stars: ✭ 345 (+439.06%)
Mutual labels:  recyclerview, listview
Boardview
A draggable boardview for java android (Kanban style)
Stars: ✭ 309 (+382.81%)
Mutual labels:  recyclerview, listview
Countdownlabel
Simple countdown UILabel with morphing animation, and some useful function.
Stars: ✭ 714 (+1015.63%)
Mutual labels:  timer, countdown
Termdown
Countdown timer and stopwatch in your terminal
Stars: ✭ 749 (+1070.31%)
Mutual labels:  timer, countdown
React Native Super Grid
Responsive Grid View for React Native
Stars: ✭ 971 (+1417.19%)
Mutual labels:  listview, gridview

CountDownTask

CountDownTask is a countdown library. It can work with a single view or a adapter view, etc.

中文: http://mo0n1andin.github.io/android-case-abslistview-count-down

Gradle

compile 'com.github.erehmi:countdowntask:1.0.1'

Usage

Create a countdown task:

CountDownTask countDownTask = CountDownTask.create()

Build the target time since the system was booted, and include deep sleep. For example, 6 seconds later:

long targetMillis = CountDownTask.elapsedRealtime() + 1000 * 60;

Apply the countdown to a view, e.g. a TextView, and 1 second countdown interval:

final int CD_INTERVAL = 1000;

countDownTask.until(textView, targetMillis, CD_INTERVAL, new OnCountDownListener() {
    @Override
    public void onTick(View view, long millisUntilFinished) {
        ((TextView)view).setText(String.valueOf(millisUntilFinished / CD_INTERVAL));
    }
    @Override
    public void onFinish(View view) {
        ((TextView)view).setText("DONE.");
    }
});

When the count task is no longer needed, cancel it:

countDownTask.cancel(textView);

or

countDownTask.cancel();

Example

License

Copyright 2016, mo0n1andin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].