Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

sartt timer of 40 second when send otp andrpid

public void reverseTimer(int Seconds,final TextView tv){

    new CountDownTimer(Seconds* 1000+1000, 1000) {

        public void onTick(long millisUntilFinished) {
            int seconds = (int) (millisUntilFinished / 1000);
            int minutes = seconds / 60;
            seconds = seconds % 60;
            tv.setText("TIME : " + String.format("%02d", minutes)
                    + ":" + String.format("%02d", seconds));
        }

        public void onFinish() {
            tv.setText("Completed");
        }
    }.start();
}
Comment

PREVIOUS NEXT
Code Example
Java :: void add method using collections 
Java :: java 11 read file line by line 
Java :: flutter android studio Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema 
Java :: custom validator arrays 
Java :: Write program for problem 1 such that every regex runs as its own thread in java 
Java :: java Map to LinkedHashMap with ascending order of keys 
Java :: how to add a note in java 
Java :: jagermeister price in bangalore 
Java :: java.lang.StackOverflowError 
Java :: JAVA for-each Loop Sytnax 
Java :: webview send to console android 
Java :: using handler runnable for refresh android 
Java :: kivy menu bar 
Java :: crazy error 
Java :: how to add new nod in dynamic treeview using javascipt 
Java :: staging and production environment logging spring boot 
Java :: javax.ws.rs.core.response readentity not found 
Java :: simple text formatter as in textbook 
Java :: how to put all words from a file in an array java 
Java :: Java Single element Annotations 
Java :: set skin minecraft entity player 
Java :: Encrypt words facebook 
Java :: cancel javafx stage exit request 
Java :: set attribute java 
Java :: paysimple 
Java :: Java labeled break Statement 
Java :: how to put array in array list stack overflow 
Java :: fibonacci for biginteger 
Java :: nullpointer extension 
Java :: how to add a command to a button java 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =