title: Can't call MainActivity methods from its class
body: <p>I looked everywhere and couldn't find what's wrong with my code, I am simply trying to call a MainActivity method from its own class:</p>
  
  <p><strong>MainActivity.java:</strong></p>
  
  <pre><code>import androidx.appcompat.app.AppCompatActivity;
  
  import android.os.Bundle;
  
  public class MainActivity extends AppCompatActivity {
  
      TestiClass testi = new TestiClass(this,this);
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
      public void testi_method(){
  
      }
  
  }
  </code></pre>
  
  <p><strong>TestiClass.java:</strong></p>
  
  <pre><code>import android.app.Activity;
  import android.content.Context;
  
  public class TestiClass {
  
      private Activity mActivity;
      private Context mContext;
  
      TestiClass(Activity activity ,Context context){
          this.mActivity = activity;
          this.mContext = context;
      }
  
      void test(){
          mActivity.testi_method(); //????
      }
  
  }
  </code></pre>
  
  <p><code>mActivity.testi_method()</code> says - cannot resolve method... 
  Any Thoughts?</p>