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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -