title: how do i create a toast for an activity from inside a different class
body: <p>I have a class separate from my activity and I want a toast that appears in that activity when a method is called from the class. how do i do that? </p>
  
  <p>Here is the method from the class. 
  I want the toast to be called in the <code>else if (counter &lt; addSpend)</code> statement.</p>
  
  <pre><code>public void shipAdd()
  {
      if(counter &gt;= addSpend)
      {
          counter -= addSpend;
          new TimerClass(addTime,1000)
          {
  
              public void onFinish() {
  
                  counter += addAmount;
                  this.start();
  
              }
          }.start();
      }else if (counter &lt; addSpend)
      {
  
      }
  
  }
  </code></pre>