From 776977ebe865bb31a2e270d0621a0354394d7fe3 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Thu, 16 Oct 2014 08:49:08 +0100 Subject: [PATCH] Tweaked UI, changed location to Milton Keynes --- app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java | 4 ++-- app/src/main/res/layout/fragment_main.xml | 2 +- app/src/main/res/menu/forecastfragment.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java b/app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java index add4745..7a3eedf 100644 --- a/app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java +++ b/app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java @@ -60,7 +60,7 @@ public class ForecastFragment extends Fragment { 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); @@ -135,7 +135,7 @@ public class ForecastFragment extends Fragment { // 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"; diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index a670725..214ec97 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -6,7 +6,7 @@ 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"> -- 2.34.1