Howdy.
Instead of displaying text for a few seconds using toast, I would like to display it permanently. At first, I thought toast would be better, now I can't figure out how to simply display it.
Here is the toast code:
public void onClick(View arg0)
{
gps = new GPSTracker(TrackingActivity.this);
if(gps.LocationFound())
{
double latitude = gps.getLatitude();
double longitude = gps.getLongitude();
Toast.makeText(getApplicationContext(), "Your Location is - \nLat: " + latitude + "\nLong: " + longitude, Toast.LENGTH_LONG).show();
}
......
Here is what I tried:
public void onClick(View arg0)
{
gps = new GPSTracker(TrackingActivity.this);
if(gps.LocationFound())
{
double latitude = gps.getLatitude();
double longitude = gps.getLongitude();
TextView textViewObject = new TextView(this);
textViewObject.setText("Your Location is - \nLat: " + latitude + "\nLong: " + longitude);
setContentView(textViewObject);
......
I've done some searching and perhaps I should use a dialoge box? However, dialogue insinuates interaction, which is not what I want.
Any suggestiosn? Thanks.