I am fairly new to Android and Java and hope you can help me with this.
I have a nested class:
public class MyLocationListener implements LocationListener
{
public void onLocationChanged(Location loc)
{
loc.getLatitude();
loc.getLongitude();
String loTude = "Longitude:" + loc.getLongitude();
String laTude = "Latitude: " + loc.getLatitude();
((TextView) findViewById(R.id.tvLong)).setText(loTude);
((TextView) findViewById(R.id.tvLat)).setText(laTude);
}
How can i access the two Strings loTude and laTude from my outer class?
Do i need to return them from the method via an object, or is there any other way?
If you have nested class then make Global object of textview Like as….