title: update text constantly through for() loop and Handler
body: <p>I am working on a Testing Project for me , just so I could learn more , so now I need to update the text of a <code>TextView</code> constantly every 250 milliseconds through a <code>for(;;)</code> loop , it happens after a Button click ... My problem is that whenever I press that button my app freezes (Yes my button is totally working , verified through previous testings) , I am using a handler to the Main thread doesn't get affected while the <code>Runnable</code> is up ... Here is my code of the Button and Handler ...</p>
  
  <pre><code>final Handler handler = new Handler();
          B3.setOnClickListener(new View.OnClickListener() {
  
  
              @Override
              public void onClick(View v) {
  
                  handler.post(new Runnable() {
  
                      @Override
                      public void run() {
                          // TODO Auto-generated method stub
                          for(;;){
                              String a = Shells.sendSingleCommand("free");//Here I send a command "free" and it returns its output 
                              text.setText(a);//text is my TextView which is used through my experimentations ... 
                              synchronized(this){
                                  try{
                                      wait(250);
                                  }catch(Exception e){
  
                                  }
                          }
  
                          }
                      }
                  });
                  }
  
          });
  </code></pre>
  
  <p>If you need anymore info ask please :)</p>