Wednesday 5 August 2020

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.

No comments:

Post a Comment

How to delete Local_lvm storage and resize local storage to use full disk space?

1) Delete the Local_lvm from othe proxmox interface . "datacenter" > Storage. Select the local_lvm storage and click "Remo...