java - Runnable wont stop -
i making game if player intersects bear, stop runnable thread. somehow wont stop @ all. when player intersects bear, player should dead. dead loop called not stop runnable. made runnable loop below protected void movement() { final int delay = 5; speed = 20; r = new runnable() { @override public void run() { if (countscore % 300 == 0) { speed = speed + 5; } bear1.sety(bear1.gety() + speed); bear2.sety(bear2.gety() + speed); reframeroad(); if ((animimageview.getx() < bear1.getx() + 50 && animimageview.getx() > bear1.getx() - 50) || (animimageview.getx() > bear2.getx() && animimageview.getx() < bear2.getx())) { system.out.println("goes inside getx intersects x "); dead(); } if (rect.intersects(thiefrect, bear1rect) || rect.intersects(thiefrect,...