title: How to update Android Views upon modifications?
body: <p>I have some methods in my View that modify some of the shapes that are drawn when called. In Java in order to make sure the component is updated I would call <code>repaint()</code>. Is there something that will make sure my view is updated correctly? </p>
  
  <p>I had read somewhere that calling <code>invalidate()</code> in the <code>onDraw()</code> method would keep things up to date and therefore I wouldn't need to have something like <code>repaint()</code> in my methods that modify that shapes that are drawn.</p>
  
  <p>Is this correct, or is there something else I have to do?</p>
  
  <p><strong>EDIT</strong>
  <br>
  <br> To add in an example, a method I call in my view is:</p>
  
  <pre><code>public void setLineThickness(int thickness) {
      aLineThickness = thickness;
  
      if(aLineThicness &gt; 1)
          //repaint();      - Okay in Java but not in Android
  
  }
  </code></pre>