title: Android - Call onDraw() explicitly
body: <p>I have a situation in which I want to draw some values in canvas. These values comes from another activity.</p>
  
  <pre><code> Canvas myCanvas;
  
  public void findSubUnit(String name) {
      unitName = name;
      for (Entry&lt;String, ArrayList&lt;String&gt;&gt; values : subUnits.entrySet()) {
  
          key = values.getKey();
          if (unitName.equalsIgnoreCase(key)) {
              Log.i("prj,match unit=", key);
  
              v = values.getValue();
              myCanvas = new Canvas();
              onDraw(myCanvas);
  
          }
      }
  </code></pre>
  
  <p>This is my <code>onDraw</code> method.</p>
  
  <pre><code>  void onDraw(Canvas canvas, ArrayList&lt;String&gt; units) {
          Paint paint = new Paint();
          paint.setColor(Color.RED);
          canvas.drawText("hello", 100, 130, paint);
      }
  </code></pre>
  
  <p>It display nothing even not an error. How can I send <code>arraylist</code> to <code>onDraw</code> explicitly.</p>