How to refresh an activity?
- by poeschlorn
Hi Guys,
after implementing some Android Apps, including several Map activities, I try to refresh the activity when the GPS listener's onLocationChanged() mehtod is called.
I have no Idea how to tell the map activity to refresh on its own and display the new coords...
the coords to store will have to be in global values, so that the location listener will have access to it.
In my sample GPS-class (see code below) I just changed the text of a text view....but how to do that in map view?
private class MyLocationListener implements LocationListener {
@Override
public void onLocationChanged(Location loc) {
final TextView tv = (TextView) findViewById(R.id.myTextView);
if (loc != null) {
tv.setText("Location changed : Lat: " + loc.getLatitude()
+ " Lng: " + loc.getLongitude());
}
}
I think the solution of this Problem won't be very difficult, but I just need the beginning ;-)
This whole app shall work like a really simple navigation system.
It would be great if someone could help me a little bit further :)
nice greetings,
Poeschlorn