Android 启动页,倒计时 view

项目地址: CountdownView
简介:Android 启动页,倒计时 view
  • gradle
compile 'cn.lemon:countdownview:0.1.0'

使用


mCountdownView = (CountdownView) findViewById(R.id.countdown);
mCountdownView.setText("计时");
mCountdownView.setTime(5000);
mCountdownView.star();
mCountdownView.setEndAction(new Action() {
     @Override
     public void onAction() {
          Toast.makeText(MainActivity.this,"结束",Toast.LENGTH_SHORT).show();
     }
});
mCountdownView.setOnClickListener(new View.OnClickListener() {
     @Override
     public void onClick(View view) {
         Toast.makeText(MainActivity.this,"点击",Toast.LENGTH_SHORT).show();
     }
});

demo

你可能感兴趣的:(Android,自定义控件进阶)