title: Call a function in an activity from SimpleOnGestureListener
body: <p>I have a main activity with custom canvas:</p>
  
  <pre><code>    public void onCreate(Bundle savedInstanceState) {
          ...
          CustomCanvas c = new CustomCanvas(this);
          c.requestFocus();
          cll = (LinearLayout)findViewById(R.id.CLL);
          cll.addView(c);
      }
  
      public void qwerty(String w) {
          ....
          TextView abc = (TextView)findViewById(R.id.TextViewabc);
          abc.setText(w);
          ....
      }
  </code></pre>
  
  <p>Inside CustomCanvas, I have a GestureDetector with SimpleOnGestureListener.
  I want to call qwerty() from the methods of SimpleOnGestureListener (such as onSingleTapConfirmed)</p>
  
  <p>Is this possible? If not is there another way of doing so?
  Thanks</p>
  
  <p><strong>....EDIT..... (more info)</strong></p>
  
  <p>GestureDetector is an object in my CustomCanvas </p>
  
  <pre><code>public class CustomCanvas extends View {
  
      GestureDetector gd;
      ...
  
      public CustomCanvas(final Context context) {
          super(context);
  
          gd = new GestureDetector(getContext(), new SimpleOnGestureListener() {
              ....
              //  I also use getScrollX() and getScrollY() in some of the methods here
          });
      }
  
      ....
  
      @Override
      public boolean onTouchEvent(MotionEvent ev) {
          return gd.onTouchEvent(ev);
      }
  }
  </code></pre>