Display humidity and wind data in forecast dialog
WeatherInfo already has the data and it just needed to be exposed
Change-Id: I8819ad0cd3d0798b1bd6ae50fbc2769922d63748
diff --git a/res/layout/forecast_activity.xml b/res/layout/forecast_activity.xml
index 1ac7635..1462617 100644
--- a/res/layout/forecast_activity.xml
+++ b/res/layout/forecast_activity.xml
@@ -123,19 +123,29 @@
android:layout_centerHorizontal="true"
android:textAppearance="?android:attr/textAppearanceLarge" />
+ <TextView
+ android:id="@+id/weather_low_high"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/weather_temp"
+ android:layout_centerHorizontal="true"
+ android:paddingBottom="2dip"
+ android:textSize="12sp"
+ android:textColor="?android:attr/textColorPrimary" />
+
<ImageView
android:id="@+id/weather_divider"
- android:layout_below="@id/weather_temp"
+ android:layout_below="@id/weather_low_high"
android:layout_width="44dip"
android:layout_height="1dip"
android:layout_centerHorizontal="true"
android:background="@android:drawable/divider_horizontal_dark" />
<TextView
- android:id="@+id/weather_low_high"
+ android:id="@+id/weather_hum_wind"
+ android:layout_below="@id/weather_divider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/weather_divider"
android:layout_centerHorizontal="true"
android:paddingTop="2dip"
android:textSize="12sp"
diff --git a/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java b/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java
index 6f8da53..f5e4e6d 100644
--- a/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java
+++ b/src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java
@@ -80,6 +80,11 @@
TextView weatherTemp = (TextView) view.findViewById(R.id.weather_temp);
weatherTemp.setText(w.getFormattedTemperature());
+ // Humidity and Wind
+ TextView weatherHumWind = (TextView) view.findViewById(R.id.weather_hum_wind);
+ weatherHumWind.setText(w.getFormattedHumidity() + ", " + w.getFormattedWindSpeed() + " "
+ + w.getWindDirection());
+
// City
TextView city = (TextView) view.findViewById(R.id.weather_city);
city.setText(w.getCity());