android - how render canvas on imageView to show circle moving faster (not jumping) -
i have balls class extends imageview , on have circle ball going left side right side , in time speed of moving increased <
private void render() { while (true) { thread.sleep(30); if(x > getwidth()){ step++ && x = 0; } x += step } } private void update() { while (true) { thread.sleep(60); postinvalidate(); } }
any thing when step equals 20 , more < ball not movie rightly , see jumping <
i testing step = 5 , thread.sleep(value--) < did not work rightly how can move ball faster , render of ondraw rightly
tnx < @};-
Comments
Post a Comment