cancelling a handler.postdelayed process

后端 未结 6 1422
粉色の甜心
粉色の甜心 2020-11-28 19:27

I am using handler.postDelayed() to create a waiting period before the next stage of my app takes place. During the wait period I am displaying a dialog with pr

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 20:08

    Another way is to handle the Runnable itself:

    Runnable r = new Runnable {
        public void run() {
            if (booleanCancelMember != false) {
                //do what you need
            }
        }
    }
    

提交回复
热议问题