Simple use of Timer in Kotlin


the code below will set the button to clickable after 30 sec:

btnOk.isClickable=false
Timer().schedule(timerTask {

    btnOk.isClickable=true

}, 1000*30)

the above code runs in a separate thread, 
so the UI is responsive while running this code.

Comments

Popular posts from this blog

GIT - SSL certificate problem: unable to get local issuer certificate

TFS -GIT CertGetCertificateChain trust error CERT_TRUST_IS_UNTRUSTED_ROOT

Convert Premium SSD to Standard HDD in Azure