Accessing method in main activity from another class
<p>How do I access the method myMethod from another class?</p>

<pre><code>public class controller extends Activity 
{

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    int myMethod() {int id = 0; return id;} //arbitrary example, may also be static?
}
</code></pre>
