Skip to content

Instantly share code, notes, and snippets.

@AbGhost-cyber
Created October 28, 2020 04:05
Show Gist options
  • Save AbGhost-cyber/4f763156378a02d4dd76d49a6a63af8a to your computer and use it in GitHub Desktop.
Save AbGhost-cyber/4f763156378a02d4dd76d49a6a63af8a to your computer and use it in GitHub Desktop.
viewPdf.visibility = View.VISIBLE
viewPdf.setOnClickListener {
//your action here
}
val countDown = 4000L
val countDownTimer = object : CountDownTimer(countDown, 1000) {
override fun onFinish() {
viewPdf.visibility = View.GONE
}
override fun onTick(p0: Long) {
val text = "View Pdf ${p0 / 1000}"
viewPdf.text = text
}
if (viewPdf.visibility == View.VISIBLE) {
countDownTimer.start()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment