how to stop Handler in Android?

后端 未结 6 1283
名媛妹妹
名媛妹妹 2020-12-08 09:32

In My Application my handler doesn\'t stop. How can I stop the handler?
It continues to start after closing the activity. What can i do?

the code is :



        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 10:05

    It never stops because you are always sending a message! I think you want to remove handler.sendEmptyMessageDelayed(0,0000);, which in fact makes no sense (are you delaying a message 0 milliseconds?).

提交回复
热议问题