Code Monkey home page Code Monkey logo

easykits's Introduction

easykits

A Simple Kits For Android

Android倒计时组件


1、适用于列表及其他任何场景的倒计时
2、组件内部处理资源释放和倒计时的处理
3、使用时只需设置目标时间(目标时间需要大于当前时间),可以自由支持展示文本格式
4、倒计时结束需要处理事务时传入结束监听,自行处理结束业务。

使用方式:

在project下的build.gradle文件中加入

repositories {
   mavenCentral()     
}

在app下的build.gradle文件中引入依赖

implementation 'cn.dlihasa.easykits:countdown:x.x.x'

在xml中引入控件

...省略...

代码中使用方式如下

CountDownView countDownView = (CountDownView)findViewById(R.id.countDownView);
countDownView.setCompareTime(System.currentTimeMillis()+2000);//设置目标时间
countDownView.setFormat("剩余时间:mm:hh:ss");//支持xml配置文本格式
countDownView.setCountDownListener(new ICountDownListener() {
    @Override
    public void onFinish() {
        //设置监听结束业务
    }
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.