Hi all,
I'm developing a weather forecast application and I'm in need of some help here.
At first, the application uses radio buttons to either get the location of the user through GPS or enter a location manually. Once the user decides what they will do, I used the code below to progress:
handleReverseGeocodeClick(); calls up Google's reverse geocoding and translates the coordinates to a location, and the other code converts the location to a string and calls the parseWeather() method to operate on a parser to parse the report from the goolge api.
I then implemented the parser and created another class, WeatherReport which basically stores information about the weather.
As the parser goes through the report, I used the following code to store the details in WeatherReport:
I've created the layout of the weather report in another view, called report and I want to load this layout once the parsing is complete. I don't really know how to do that so any help would be appreciated.
Thank you
I'm developing a weather forecast application and I'm in need of some help here.
At first, the application uses radio buttons to either get the location of the user through GPS or enter a location manually. Once the user decides what they will do, I used the code below to progress:
Code:
public void onClick(View v) {
if (v == getReport)
{
if(getLocation.isChecked() == true)
{
handleReverseGeocodeClick();
}
if(specifyLocation.isChecked() == true)
{
locationString = ((EditText) findViewById(R.id.locationInput)).getText().toString();
parseWeather(locationString);
}
}
handleReverseGeocodeClick(); calls up Google's reverse geocoding and translates the coordinates to a location, and the other code converts the location to a string and calls the parseWeather() method to operate on a parser to parse the report from the goolge api.
I then implemented the parser and created another class, WeatherReport which basically stores information about the weather.
As the parser goes through the report, I used the following code to store the details in WeatherReport:
Code:
int temp = Integer.parseInt(dataAttribute);
this.weatherReport.setTomorrowsMaxTemp(temp);
I've created the layout of the weather report in another view, called report and I want to load this layout once the parsing is complete. I don't really know how to do that so any help would be appreciated.
Thank you