Skip to content

安卓倒计时按钮控件 android-Countdown-Button

Notifications You must be signed in to change notification settings

643063150/TimerButton-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TimerButton

Android平台下的倒计时按钮 Countdown-Button

Use in Gradle

compile 'com.cxmscb:TimerButtonLib:0.0.6'

使用方式 / Java

		private TimerButton timerButton;
		
        timerButton = (TimerButton) findViewById(R.id.timer_Button);

		timerButton.setText("获取验证码");
        timerButton.init("重 发",10000); // can set in XML

        timerButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
			
                timerButton.startTimer();
				
				//TODO YOURS
				
                //Toast.makeText(MainActivity.this,"TODO",Toast.LENGTH_SHORT).show();
				
            }
        });

XML


    <com.cxmscb.cxm.timerbuttonlib.TimerButton
        android:id="@+id/libBtn"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="17sp"
        android:gravity="center"
        android:text="获取验证码"
        app:afterText="重发"
        app:ms="10000"
        />

About

安卓倒计时按钮控件 android-Countdown-Button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages