diff options
author | Martin Herndl <martin.herndl@gmail.com> | 2016-03-31 14:13:48 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-17 02:00:16 -0700 |
commit | 8af8dab921671bdcb0cf0472c1a96d068ac6a640 (patch) | |
tree | ad6a4bbe0ceb27f0138fbd1bd2281869e8e68454 | |
parent | ed98ad9a3c16577460b0ad7ce269f982da6e3853 (diff) | |
download | android_packages_apps_LockClock-8af8dab921671bdcb0cf0472c1a96d068ac6a640.tar.gz android_packages_apps_LockClock-8af8dab921671bdcb0cf0472c1a96d068ac6a640.tar.bz2 android_packages_apps_LockClock-8af8dab921671bdcb0cf0472c1a96d068ac6a640.zip |
Display humidity and wind data in forecast dialog
WeatherInfo already has the data and it just needed to be exposed
Change-Id: I8819ad0cd3d0798b1bd6ae50fbc2769922d63748
-rw-r--r-- | res/layout/forecast_activity.xml | 16 | ||||
-rw-r--r-- | src/com/cyanogenmod/lockclock/weather/ForecastBuilder.java | 5 |
2 files changed, 18 insertions, 3 deletions
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 @@ public class ForecastBuilder { 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()); |