How to set TextView text from a different class?
<p>I'm trying to set a textview text when the user location changes.  All the code for the GPS portion works. I have been testing using Log();</p>

<p>Now instead of using Log, I wish to display the same information on the main layout, but the LocationChanged event is in a different class so I don't have access to the layout.</p>

<pre><code>public class mylocationlistener implements LocationListener
{

@Override
public void onLocationChanged(Location location)
{
    if (location != null)
    {
        Log.v("kjdv", location.getLatitude() + ", " + location.getLongitude());
        //I would like to set a textview here, but don't have access to the object
    }
}
</code></pre>

<p>This class gets created here:</p>

<pre><code>public class gps extends ListActivity implements View.OnClickListener
{

@Override
public void onCreate(Bundle icicle)
{
    super.onCreate(icicle);
    setContentView(R.layout.main);

    SetupLocationListener();
}

public void SetupLocationListener()
{
    LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    LocationListener ll = new mylocationlistener(this);
    lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, ll);
}
</code></pre>

<p>So how, from the myLocationListener class can I set text in the onLocationChanged event?</p>

<p>Thanks!</p>
