How to call method from separate package : Android
<p>I am trying to get a method from the file Duality.java to be run in Min.Java when a button is clicked. Below are the two files and what I am currently trying to do, which is not working. How do I get the method duality() to run when the button is clicked within Min.java?</p>

<p>Duality.java</p>

<pre><code>package com.android.control;

import android.util.Log;
import com.map.AppName.R;

public class duality {

    public void duality(){
       Log.e("Did It Run","Yes it ran");
    }
}
</code></pre>

<p>Min.java</p>

<pre><code>package com.android.control;

import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.map.AppName.R;

public class Min extends LinearLayout {

    Button but;
    private final int ELEMENT_HEIGHT = 60;
    private final int ELEMENT_WIDTH = 80;;
    private final int TEXT_SIZE = 30; 

    public Min( Context context, AttributeSet attributeSet ) {
        super(context, attributeSet);   

        this.setLayoutParams( new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT ) );
        LayoutParams elementParams = new LinearLayout.LayoutParams( ELEMENT_WIDTH, ELEMENT_HEIGHT );

        createBut( context );

        addView( but, elementParams );
    }

private void createButton( Context context){
        but = new Button( context );
        but.setTextSize( TEXT_SIZE );
        but.setText( "Go" );

        but.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {

                 Duality duality = new duality();

            }
        });
}
}
</code></pre>
