title: how to acces main activity content in subclass in android
body: <p>i have edit text on main activity i need to access this edit text on my sub class ......</p>
  
  <p>this is my main activity </p>
  
  <pre><code>private EditText et1;
      private EditText et2, et;
  
  // int dec = et.getText().toString().length()-1;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      et1 = (EditText) findViewById(R.id.editText1);
      et2 = (EditText) findViewById(R.id.editText2);
      et = et1;
      gLib = GestureLibraries.fromRawResource(this, R.raw.gestures);
  
      // glip1 = GestureLibraries.fromRawResource(this, R.raw.gestures1);
  
      if (!gLib.load()) {
          Log.w(TAG, "could not load gesture library");
          finish();
      }
      GestureOverlayView gestures = (GestureOverlayView) findViewById(R.id.gestures);
      common myHandler = new common();
      gestures.addOnGesturePerformedListener(myHandler);
  }
  </code></pre>
  
  <p>this is my class</p>
  
  <pre><code>public class common implements OnGesturePerformedListener {
  
  
      @Override
      public void onGesturePerformed(GestureOverlayView gestureView,
              Gesture gesture) {
          System.out.println("guster");
  
          ArrayList&lt;Prediction&gt; predictions = gLib.recognize(gesture);//i have to acces glip from main activity
          // ArrayList&lt;Prediction&gt; predictions1 = glip1.recognize(gesture);
          // one prediction needed
          if (predictions.size() &gt; 0 &amp;&amp; predictions.get(0).score &gt; 2.0) {
              String prediction = predictions.get(0).name;
              // checking prediction
  
              if (prediction.equals("A")) {
                  // and action
                  et.append("A");// i have to access edit text from main activity
                  // et.getText().insert(et.getSelectionStart(), "A");
              }
          }
      }
  }
  </code></pre>