Tweaked UI, changed location to Milton Keynes
authorNeil Smith <neil.git@njae.me.uk>
Thu, 16 Oct 2014 07:49:08 +0000 (08:49 +0100)
committerNeil Smith <neil.git@njae.me.uk>
Thu, 16 Oct 2014 07:49:08 +0000 (08:49 +0100)
app/src/main/java/uk/me/njae/sunshine/ForecastFragment.java
app/src/main/res/layout/fragment_main.xml
app/src/main/res/menu/forecastfragment.xml

index add4745fa2f11fe95f05bbab182cf0dc5179439e..7a3eedf944fed00c24ee96665fd4ff043ad28a2a 100644 (file)
@@ -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";
index a67072568f87ae0747cf76e1aea1214344b8ba1a..214ec97eaf365d3801661a0e05aa5f79f25fb718 100644 (file)
@@ -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">
 
     <ListView
         android:id="@+id/listview_forecast"
index 7ad5987b5d9cabc3145b21ac571ab94466427e34..48c679508b90ce0eb5fbfab4fa7d4d0a0fd846ac 100644 (file)
@@ -4,6 +4,6 @@
     tools:context=".MainActivity" >
     <item android:id="@+id/action_refresh"
         android:title="@string/action_refresh"
-        android:orderInCategory="100"
+        android:orderInCategory="50"
         app:showAsAction="never" />
 </menu>