title: Reusing the same Thread
body: <p>I have an <code>onClick()</code> method with a <code>Thread</code> inside that. The simplified structure is the following.</p>
  
  <pre><code>imageA = (ImageView) findViewById(R.id.imageA);
  imageA.setOnClickListener(new View.OnClickListener() {
     @Override
     public void onClick(View view) {myThread.start();}
  });
  
  Thread myThread = new Thread() {
      @Override
      public void run() {
          // some stuff here
      }
  };
  </code></pre>
  
  <p>Clicking a second time, I get the following error:</p>
  
  <pre><code>Thread already started
  </code></pre>
  
  <p>I have read in some forums that it is not a good idea to start a <code>Thread</code> more than once and that it is not enough to use:</p>
  
  <pre><code>if (!myThread.isAlive()){myThread.start();}
  </code></pre>
  
  <p>The suggested option is to create a new <code>Thread</code>. The problem is that reusing the same <code>Thread</code> is more comfortable for me. So questions are:</p>
  
  <ol>
  <li>Is it true that I should avoid reusing the same <code>Thread</code>?</li>
  <li>If yes, what is the best practice to rewrite that code?</li>
  </ol>
  
  <p>Thanks</p>