int id = item.getItemId();
if (id == R.id.action_refresh) {
FetchWeatherTask weatherTask = new FetchWeatherTask();
- weatherTask.execute("94043");
+ weatherTask.execute("2642465");
return true;
}
return super.onOptionsItemSelected(item);
// Possible parameters are avaiable at OWM's forecast API page, at
// http://openweathermap.org/API#forecast
final String FORECAST_BASE_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?";
- final String QUERY_PARAM = "q";
+ final String QUERY_PARAM = "id";
final String FORMAT_PARAM = "mode";
final String UNITS_PARAM = "units";
final String DAYS_PARAM = "cnt";
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
- tools:context=".MainActivity$PlaceholderFragment">
+ tools:context=".MainActivity$ForecastFragment">
<ListView
android:id="@+id/listview_forecast"
tools:context=".MainActivity" >
<item android:id="@+id/action_refresh"
android:title="@string/action_refresh"
- android:orderInCategory="100"
+ android:orderInCategory="50"
app:showAsAction="never" />
</menu>