+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/weather_current_data"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:orientation="vertical"
- tools:context="de.example.exampletdd.WeatherInformationCurrentDataActivity"
- tools:ignore="MergeRootFrame" >
-
- <fragment
- android:id="@+id/weather_current_data_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- class="de.example.exampletdd.fragment.current.CurrentFragment" />
-
-</LinearLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:baselineAligned="false"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Feels like temperature -->
- <TextView
- android:id="@+id/weather_current_now_data_feelslike"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="FEELS LIKE"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Feels like temperature Value-->
- <TextView
- android:id="@+id/weather_current_now_data_feelslike_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="55"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Feels like temperature Units-->
- <TextView
- android:id="@+id/weather_current_now_data_feelslike_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" ÂșC"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Humidity -->
-
- <TextView
- android:id="@+id/weather_current_now_data_humidity"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_margin="5dp"
- android:gravity="left"
- android:text="HUMIDITY"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textStyle="bold" />
-
- <!-- Humidity Value-->
- <TextView
- android:id="@+id/weather_current_now_data_humidity_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="83"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Humidity Units-->
- <TextView
- android:id="@+id/weather_current_now_data_humidity_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="%"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Rain -->
- <TextView
- android:id="@+id/weather_current_now_data_rain"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="RAIN"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Rain Value-->
- <TextView
- android:id="@+id/weather_current_now_data_rain_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1.24"
- android:layout_gravity="left"
- android:gravity="left"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Rain Units -->
- <TextView
- android:id="@+id/weather_current_now_data_rain_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" mm 3h"
- android:layout_gravity="left"
- android:gravity="left"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:orientation="horizontal" >
- <!-- Snow -->
- <TextView
- android:id="@+id/weather_current_now_data_snow"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="SNOW"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Snow Value-->
- <TextView
- android:id="@+id/weather_current_now_data_snow_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1.22"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Snow Units-->
- <TextView
- android:id="@+id/weather_current_now_data_snow_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" mm 3h"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Wind -->
- <TextView
- android:id="@+id/weather_current_now_data_wind"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="WIND"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Wind Value-->
- <TextView
- android:id="@+id/weather_current_now_data_wind_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="6.36"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Wind Units -->
- <TextView
- android:id="@+id/weather_current_now_data_wind_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" m/s"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Clouds -->
- <TextView
- android:id="@+id/weather_current_now_data_clouds"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="CLOUDS"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Clouds Value-->
- <TextView
- android:id="@+id/weather_current_now_data_clouds_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="6.36"
- android:layout_gravity="right"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
-
- <!-- Clouds Units -->
- <TextView
- android:id="@+id/weather_current_now_data_clouds_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="%"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
- </LinearLayout>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:orientation="horizontal" >
-
- <!-- Pressure -->
- <TextView
- android:id="@+id/weather_current_now_data_pressure"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="PRESSURE"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Pressure Value-->
- <TextView
- android:id="@+id/weather_current_now_data_pressure_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1036.05"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Pressure Units-->
- <TextView
- android:id="@+id/weather_current_now_data_pressure_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" hpa"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="horizontal" >
- <TextView
- android:id="@+id/weather_current_now_data_sunrise"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_margin="5dp"
- android:text="SUN RISE"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textStyle="bold" />
-
- <TextView
- android:id="@+id/weather_current_now_data_sunrise_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:text="2014.04.20 10:29:33"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="horizontal" >
-
- <TextView
- android:id="@+id/weather_current_now_data_sunset"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_margin="5dp"
- android:text="SUN SET"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textStyle="bold" />
-
- <TextView
- android:id="@+id/weather_current_now_data_sunset_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:text="2014.04.20 10:29:33"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
- </LinearLayout>
-
-</LinearLayout>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="50dp"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="horizontal" >
-
- <ImageView
- android:id="@+id/weather_current_data_picture"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:contentDescription="@string/icon_weather_description"
- android:scaleType="fitCenter"
- android:maxHeight="580dp"
- android:maxWidth="580dp"
- android:minHeight="80dp"
- android:minWidth="80dp"
- android:src="@drawable/weather_showers" />
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/weather_current_data_temp_max"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="textStart"
- android:paddingLeft="20dp"
- android:text="55ÂșC"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold" />
-
- <TextView
- android:id="@+id/weather_current_data_temp_min"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="textStart"
- android:paddingLeft="20dp"
- android:text="55ÂșC"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="normal" />
-
- </LinearLayout>
-
-</LinearLayout>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_gravity="center"
- android:layout_height="140dp" >
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <!-- Temperature -->
- <TextView
- android:id="@+id/weather_morn_temperature"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="55ÂșC"
- android:textAlignment="center"
- android:gravity="center|center_vertical"
- android:layout_below="@+id/weather_morn"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Time of day -->
- <TextView
- android:id="@+id/weather_morn"
- android:layout_width="140dp"
- android:layout_height="wrap_content"
- android:text="MORNING"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textAlignment="center"
- android:gravity="center"
- android:layout_alignParentTop="true"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </RelativeLayout>
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
-
- <!-- Temperature -->
- <TextView
- android:id="@+id/weather_day_temperature"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="55ÂșC"
- android:textAlignment="center"
- android:gravity="center|center_vertical"
- android:layout_below="@+id/weather_day"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Time of day -->
- <TextView
- android:id="@+id/weather_day"
- android:layout_width="140dp"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerInParent="true"
- android:gravity="center"
- android:selectAllOnFocus="true"
- android:text="DAY"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textAlignment="center"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </RelativeLayout>
-
-
-
-
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
-
-
- <!-- Temperature -->
- <TextView
- android:id="@+id/weather_eve_temperature"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="55ÂșC"
- android:textAlignment="center"
- android:gravity="center|center_vertical"
- android:layout_below="@+id/weather_eve"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Time of day -->
- <TextView
- android:id="@+id/weather_eve"
- android:layout_width="140dp"
- android:layout_height="wrap_content"
- android:text="EVENING"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textAlignment="center"
- android:layout_centerInParent="true"
- android:gravity="center"
- android:layout_alignParentTop="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </RelativeLayout>
-
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
-
- <!-- Temperature -->
- <TextView
- android:id="@+id/weather_night_temperature"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:text="55ÂșC"
- android:textAlignment="center"
- android:gravity="center|center_vertical"
- android:layout_below="@+id/weather_night"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Time of day -->
- <TextView
- android:id="@+id/weather_night"
- android:layout_width="140dp"
- android:layout_height="wrap_content"
- android:text="NIGHT"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textAlignment="center"
- android:gravity="center"
- android:layout_alignParentTop="true"
- android:layout_centerInParent="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- </RelativeLayout>
-
- </LinearLayout>
-
-</HorizontalScrollView>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="horizontal" >
-
- <TextView
- android:id="@+id/weather_current_data_description"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:textAlignment="textStart"
- android:paddingBottom="50dp"
- android:paddingRight="50dp"
- android:paddingLeft="50dp"
- android:text="Light rain"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textStyle="bold" />
-
-</LinearLayout>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:baselineAligned="false"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center_horizontal"
- android:paddingTop="20dp"
- android:orientation="horizontal" >
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Humidity -->
-
- <TextView
- android:id="@+id/weather_current_data_humidity"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_margin="5dp"
- android:gravity="left"
- android:text="HUMIDITY"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="@color/weather_time_of_day_color_title"
- android:textStyle="bold" />
-
- <!-- Humidity Value-->
- <TextView
- android:id="@+id/weather_current_data_humidity_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="83"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Humidity Units-->
- <TextView
- android:id="@+id/weather_current_data_humidity_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="%"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Rain -->
- <TextView
- android:id="@+id/weather_current_data_rain"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="RAIN"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Rain Value-->
- <TextView
- android:id="@+id/weather_current_data_rain_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1.24"
- android:layout_gravity="left"
- android:gravity="left"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Rain Units -->
- <TextView
- android:id="@+id/weather_current_data_rain_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" mm 3h"
- android:layout_gravity="left"
- android:gravity="left"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="0dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_gravity="center"
- android:orientation="vertical" >
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Wind -->
- <TextView
- android:id="@+id/weather_current_data_wind"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="WIND"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Wind Value-->
- <TextView
- android:id="@+id/weather_current_data_wind_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="6.36"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Wind Units -->
- <TextView
- android:id="@+id/weather_current_data_wind_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" m/s"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal" >
- <!-- Clouds -->
- <TextView
- android:id="@+id/weather_current_data_clouds"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="CLOUDS"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Clouds Value-->
- <TextView
- android:id="@+id/weather_current_data_clouds_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="6.36"
- android:layout_gravity="right"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:gravity="right"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
-
- <!-- Clouds Units -->
- <TextView
- android:id="@+id/weather_current_data_clouds_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="%"
- android:layout_gravity="right"
- android:gravity="right"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
- </LinearLayout>
- </LinearLayout>
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:paddingBottom="20dp"
- android:orientation="horizontal" >
-
- <!-- Pressure -->
- <TextView
- android:id="@+id/weather_current_data_pressure"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="PRESSURE"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:textColor="@color/weather_time_of_day_color_title"
- android:layout_margin="5dp"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold" />
-
- <!-- Pressure Value-->
- <TextView
- android:id="@+id/weather_current_data_pressure_value"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="1036.05"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="normal" />
-
- <!-- Pressure Units-->
- <TextView
- android:id="@+id/weather_current_data_pressure_units"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text=" hpa"
- android:layout_gravity="left"
- android:gravity="left"
- android:textAlignment="textStart"
- android:layout_marginTop="5dp"
- android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textStyle="bold" />
-
- </LinearLayout>
-
-</LinearLayout>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/weather_current_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <!-- TODO: align start/end feels like-snow humidity-rain wind-clouds -->
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:layout_gravity="fill_vertical|center_horizontal"
+ android:orientation="vertical" >
+
+ <!-- TODO: http://developer.android.com/guide/topics/manifest/supports-screens-element.html -->
+ <!-- TODO: supporting multiple layouts/languages http://developer.android.com/guide/practices/screens_support.html -->
+ <!-- TODO: Should I use RelativeLayout for long texts (I18N) and RTL/LTR UI?
+ With long texts, many times, text will not fit... The same for WP8 :/ -->
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:layout_gravity="top|center"
+ android:padding="50dp"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@+id/weather_current_picture"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/icon_weather_description"
+ android:scaleType="fitCenter"
+ android:gravity="center"
+ android:layout_gravity="center"
+ android:src="@drawable/weather_showers" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:layout_gravity="center"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/weather_current_temp_max"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingEnd="10dp"
+ android:paddingStart="20dp"
+ android:singleLine="true"
+ android:text="55ÂșC"
+ android:textAlignment="textStart"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold" />
+
+ <TextView
+ android:id="@+id/weather_current_temp_min"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAlignment="textStart"
+ android:paddingEnd="10dp"
+ android:paddingStart="20dp"
+ android:singleLine="true"
+ android:text="25ÂșC"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="normal" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:padding="25dp"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <TextView
+ android:id="@+id/weather_current_description"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="Light rain"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:textStyle="bold" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Feels like -->
+ <TextView
+ android:id="@+id/weather_current_feelslike"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_margin="5dp"
+ android:gravity="start"
+ android:text="FEELS LIKE"
+ android:textAlignment="textStart"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:textStyle="bold" />
+
+ <!-- Feels like Value-->
+ <TextView
+ android:id="@+id/weather_current_feelslike_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="83"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Feels like Units-->
+ <TextView
+ android:id="@+id/weather_current_feelslike_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="ÂșC"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+
+ <!-- Snow -->
+ <TextView
+ android:id="@+id/weather_current_snow"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="SNOW"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Snow Value-->
+ <TextView
+ android:id="@+id/weather_current_snow_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="1.22"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Snow Units -->
+ <TextView
+ android:id="@+id/weather_current_snow_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=" mm 3h"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Humidity -->
+ <TextView
+ android:id="@+id/weather_current_humidity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_margin="5dp"
+ android:gravity="start"
+ android:text="HUMIDITY"
+ android:textAlignment="textStart"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:textStyle="bold" />
+
+ <!-- Humidity Value-->
+ <TextView
+ android:id="@+id/weather_current_humidity_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="83"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Humidity Units-->
+ <TextView
+ android:id="@+id/weather_current_humidity_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="%"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+
+ <!-- Rain -->
+ <TextView
+ android:id="@+id/weather_current_rain"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="RAIN"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Rain Value-->
+ <TextView
+ android:id="@+id/weather_current_rain_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="1.24"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Rain Units -->
+ <TextView
+ android:id="@+id/weather_current_rain_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=" mm 3h"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+ </LinearLayout>
+
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Wind -->
+ <TextView
+ android:id="@+id/weather_current_wind"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="WIND"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Wind Value-->
+ <TextView
+ android:id="@+id/weather_current_wind_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="6.36"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Wind Units -->
+ <TextView
+ android:id="@+id/weather_current_wind_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=" m/s"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+
+ <!-- Clouds -->
+ <TextView
+ android:id="@+id/weather_current_clouds"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="CLOUDS"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Clouds Value-->
+ <TextView
+ android:id="@+id/weather_current_clouds_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="6.36"
+ android:layout_gravity="end"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Clouds Units -->
+ <TextView
+ android:id="@+id/weather_current_clouds_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="%"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:textAlignment="textEnd"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Pressure -->
+ <TextView
+ android:id="@+id/weather_current_pressure"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="PRESSURE"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Pressure Value-->
+ <TextView
+ android:id="@+id/weather_current_pressure_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="1036.05"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+
+ <!-- Pressure Units-->
+ <TextView
+ android:id="@+id/weather_current_pressure_units"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text=" hpa"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:layout_marginEnd="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold" />
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Sun rise -->
+ <TextView
+ android:id="@+id/weather_current_sunrise"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="SUN RISE"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Sun rise Value-->
+ <TextView
+ android:id="@+id/weather_current_sunrise_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="2014.04.20 10:29:33"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top|center"
+ android:orientation="horizontal" >
+
+ <!-- Sun rise -->
+ <TextView
+ android:id="@+id/weather_current_sunset"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="SUN SET"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:textColor="@color/weather_time_of_day_color_title"
+ android:layout_margin="5dp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold" />
+
+ <!-- Sun rise Value-->
+ <TextView
+ android:id="@+id/weather_current_sunset_value"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="2014.04.20 10:29:33"
+ android:layout_gravity="start"
+ android:gravity="start"
+ android:textAlignment="textStart"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="normal" />
+ </LinearLayout>
+ </LinearLayout>
+</ScrollView>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/weather_data_entry_header"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="normal" />
-
- <TextView
- android:id="@+id/weather_data_entry_body"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAlignment="textStart"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold" />
-
-</LinearLayout>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center"
- android:orientation="vertical" >
-
- <ImageView
- android:id="@+id/weather_picture"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:contentDescription="@string/icon_weather_description"
- android:scaleType="fitCenter"
- android:src="@drawable/ic_launcher" />
-
- <ListView
- android:id="@+id/weather_data_list_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- </ListView>
-
-
-</LinearLayout>
-
-
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/weather_main"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context="de.example.exampletdd.WeatherInformationActivity"
- tools:ignore="MergeRootFrame" >
-
- <fragment
- android:id="@+id/weather_overview_fragment"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- class="de.example.exampletdd.fragment.overview.OverviewFragment" />
-
-</FrameLayout>
\ No newline at end of file
android:layout_width="match_parent"
android:layout_height="match_parent" >
+ <!-- TODO: align start/end humidity-rain wind-clouds -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="textEnd"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
+ android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textAlignment="textEnd"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
+ android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
</LinearLayout>
android:textAlignment="textStart"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
+ android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
android:textAlignment="textEnd"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
+ android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
</LinearLayout>
android:textAlignment="textStart"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
- android:layout_marginRight="5dp"
+ android:layout_marginEnd="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold" />
</LinearLayout>
+++ /dev/null
-package de.example.exampletdd.fragment.current;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-import de.example.exampletdd.R;
-
-public class CurrentAdapter extends ArrayAdapter<Object> {
- private static final int FIRST = 0;
- private static final int SECOND = 1;
- private static final int THIRD = 2;
- private final int[] resources;
-
- public CurrentAdapter(final Context context, final int[] resources) {
- super(context, 0);
-
- this.resources = resources;
- }
-
-
- @Override
- public View getView(final int position, final View convertView, final ViewGroup parent) {
-
- final View view = this.getWorkingView(position, convertView);
- final int viewType = this.getItemViewType(position);
-
- if (viewType == FIRST) {
-
- final ViewFirstHolder viewHolder = this.getViewFirstHolder(view);
- final CurrentDataEntryFirst entry = (CurrentDataEntryFirst) this
- .getItem(position);
- viewHolder.picture.setImageBitmap(entry.getPicture());
- viewHolder.tempMax.setText(entry.getTempMax());
- viewHolder.tempMin.setText(entry.getTempMin());
- } else if (viewType == SECOND) {
- final ViewSecondHolder viewHolder = this.getViewSecondHolder(view);
- final CurrentDataEntrySecond entry = (CurrentDataEntrySecond) this
- .getItem(position);
- viewHolder.weatherDescription.setText(entry.getWeatherDescription());
- } else if (viewType == THIRD) {
- final ViewThirdHolder viewHolder = this.getViewThirdHolder(view);
- final CurrentDataEntryFifth entry = (CurrentDataEntryFifth) this
- .getItem(position);
- viewHolder.humidityValue.setText(entry.getHumidityValue());
- viewHolder.pressureValue.setText(entry.getPressureValue());
- viewHolder.rainValue.setText(entry.getRainValue());
- viewHolder.cloudsValue.setText(entry.getCloudsValue());
- viewHolder.windValue.setText(entry.getWindValue());
- viewHolder.sunRiseTime.setText(entry.getSunRiseTime());
- viewHolder.sunSetTime.setText(entry.getSunSetTime());
- viewHolder.feelsLike.setText(entry.getFeelsLike());
- viewHolder.snowValue.setText(entry.getSnowValue());
- viewHolder.feelsLikeUnits.setText(entry.getFeelsLikeUnits());
- }
-
- return view;
- }
-
- @Override
- public int getItemViewType(final int position) {
- int type = 0;
-
- if (position == 0) {
- type = FIRST;
- } else if (position == 1) {
- type = SECOND;
- } else if (position == 2) {
- type = THIRD;
- }
-
- return type;
- }
-
- @Override
- public int getViewTypeCount() {
- return 3;
- }
-
- private View getWorkingView(final int position, final View convertView) {
- View workingView = null;
-
- if (convertView == null) {
- final int viewType = this.getItemViewType(position);
- final Context context = this.getContext();
- final LayoutInflater inflater = (LayoutInflater) context
- .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
- workingView = inflater.inflate(this.resources[viewType], null);
- } else {
- workingView = convertView;
- }
-
- return workingView;
- }
-
- private ViewFirstHolder getViewFirstHolder(final View workingView) {
- final Object tag = workingView.getTag();
- ViewFirstHolder viewHolder = null;
-
- if ((null == tag) || !(tag instanceof ViewFirstHolder)) {
- viewHolder = new ViewFirstHolder();
-
- viewHolder.picture = (ImageView) workingView
- .findViewById(R.id.weather_current_data_picture);
- viewHolder.tempMax = (TextView) workingView
- .findViewById(R.id.weather_current_data_temp_max);
- viewHolder.tempMin = (TextView) workingView
- .findViewById(R.id.weather_current_data_temp_min);
-
- workingView.setTag(viewHolder);
-
- } else {
- viewHolder = (ViewFirstHolder) tag;
- }
-
- return viewHolder;
- }
-
- private ViewSecondHolder getViewSecondHolder(final View workingView) {
- final Object tag = workingView.getTag();
- ViewSecondHolder viewHolder = null;
-
- if ((null == tag) || !(tag instanceof ViewSecondHolder)) {
- viewHolder = new ViewSecondHolder();
-
- viewHolder.weatherDescription = (TextView) workingView
- .findViewById(R.id.weather_current_data_description);
-
- workingView.setTag(viewHolder);
-
- } else {
- viewHolder = (ViewSecondHolder) tag;
- }
-
- return viewHolder;
- }
-
- private ViewThirdHolder getViewThirdHolder(final View workingView) {
- final Object tag = workingView.getTag();
- ViewThirdHolder viewHolder = null;
-
- if ((null == tag) || !(tag instanceof ViewThirdHolder)) {
- viewHolder = new ViewThirdHolder();
-
- viewHolder.humidityValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_humidity_value);
- viewHolder.pressureValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_pressure_value);
- viewHolder.rainValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_rain_value);
- viewHolder.cloudsValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_clouds_value);
- viewHolder.windValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_wind_value);
- viewHolder.cloudsValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_clouds_value);
- viewHolder.snowValue = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_snow_value);
- viewHolder.sunRiseTime = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_sunrise_value);
- viewHolder.sunSetTime = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_sunset_value);
- viewHolder.feelsLike = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_feelslike_value);
- viewHolder.feelsLikeUnits = (TextView) workingView
- .findViewById(R.id.weather_current_now_data_feelslike_units);
-
- workingView.setTag(viewHolder);
-
- } else {
- viewHolder = (ViewThirdHolder) tag;
- }
-
- return viewHolder;
- }
-
-
- private static class ViewFirstHolder {
- public ImageView picture;
- public TextView tempMax;
- public TextView tempMin;
- }
-
- private static class ViewSecondHolder {
- public TextView weatherDescription;
- }
-
- private static class ViewThirdHolder {
- public TextView humidityValue;
- public TextView pressureValue;
- public TextView windValue;
- public TextView rainValue;
- public TextView cloudsValue;
- public TextView snowValue;
- public TextView sunRiseTime;
- public TextView sunSetTime;
- public TextView feelsLike;
- public TextView feelsLikeUnits;
- }
-}
+++ /dev/null
-package de.example.exampletdd.fragment.current;
-
-public class CurrentDataEntryFifth {
- private final String sunRiseTime;
- private final String sunSetTime;
- private final String humidityValue;
- private final String pressureValue;
- private final String windValue;
- private final String rainValue;
- private final String cloudsValue;
- private final String feelsLike;
- private final String feelsLikeUnits;
- private final String snowValue;
-
- public CurrentDataEntryFifth(final String sunRiseTime, final String sunSetTime,
- final String humidityValue, final String pressureValue, final String windValue,
- final String rainValue, final String feelsLike, final String feelsLikeUnits,
- final String snowValue,
- final String cloudsValue) {
- this.sunRiseTime = sunRiseTime;
- this.sunSetTime = sunSetTime;
- this.humidityValue = humidityValue;
- this.pressureValue = pressureValue;
- this.windValue = windValue;
- this.rainValue = rainValue;
- this.feelsLike = feelsLike;
- this.feelsLikeUnits = feelsLikeUnits;
- this.snowValue = snowValue;
- this.cloudsValue = cloudsValue;
- }
-
- public String getSunRiseTime() {
- return this.sunRiseTime;
- }
-
- public String getSunSetTime() {
- return this.sunSetTime;
- }
-
- public String getFeelsLike() {
- return this.feelsLike;
- }
-
- public String getFeelsLikeUnits() {
- return this.feelsLikeUnits;
- }
-
- public String getHumidityValue() {
- return this.humidityValue;
- }
-
- public String getPressureValue() {
- return this.pressureValue;
- }
-
- public String getWindValue() {
- return this.windValue;
- }
-
- public String getRainValue() {
- return this.rainValue;
- }
-
- public String getCloudsValue() {
- return this.cloudsValue;
- }
-
- public String getSnowValue() {
- return this.snowValue;
- }
-}
+++ /dev/null
-package de.example.exampletdd.fragment.current;
-
-import android.graphics.Bitmap;
-
-public class CurrentDataEntryFirst {
- private final Bitmap picture;
- private final String tempMax;
- private final String tempMin;
-
- public CurrentDataEntryFirst(final String tempMax, final String tempMin,
- final Bitmap picture) {
- this.tempMax = tempMax;
- this.tempMin = tempMin;
- this.picture = picture;
- }
-
- public Bitmap getPicture() {
- return this.picture;
- }
-
- public String getTempMax() {
- return this.tempMax;
- }
-
- public String getTempMin() {
- return this.tempMin;
- }
-}
+++ /dev/null
-package de.example.exampletdd.fragment.current;
-
-public class CurrentDataEntrySecond {
- private final String weatherDescription;
-
- public CurrentDataEntrySecond(final String weatherDescription) {
- this.weatherDescription = weatherDescription;
- }
-
- public String getWeatherDescription() {
- return this.weatherDescription;
- }
-
-}
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.v4.app.ListFragment;
+import android.support.v4.app.Fragment;
import android.util.Log;
-import android.widget.ListView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
import com.fasterxml.jackson.core.JsonParseException;
import de.example.exampletdd.service.IconsList;
import de.example.exampletdd.service.ServiceParser;
-public class CurrentFragment extends ListFragment {
+public class CurrentFragment extends Fragment {
private static final String TAG = "CurrentFragment";
@Override
}
@Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+
+ // Inflate the layout for this fragment
+ return inflater.inflate(R.layout.weather_current_fragment, container, false);
+ }
+
+ @Override
public void onActivityCreated(final Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
- final ListView listWeatherView = this.getListView();
- listWeatherView.setChoiceMode(ListView.CHOICE_MODE_NONE);
-
if (savedInstanceState != null) {
// Restore UI state
final Current current = (Current) savedInstanceState.getSerializable("Current");
(WeatherInformationApplication) getActivity().getApplication();
application.setCurrent(current);
}
-
- // TODO: Why don't I need mListState?
}
-
- // TODO: Why don't I need Adapter?
-
- this.setHasOptionsMenu(false);
- // TODO: string static resource
- this.setEmptyText("No data available");
- this.setListShown(true);
- this.setListShownNoAnimation(true);
}
@Override
// 3. Prepare data for UI.
- final int[] layouts = new int[3];
- layouts[0] = R.layout.weather_current_data_entry_first;
- layouts[1] = R.layout.weather_current_data_entry_second;
- layouts[2] = R.layout.weather_current_data_entry_fifth;
- final CurrentAdapter adapter = new CurrentAdapter(this.getActivity(),
- layouts);
-
-
String tempMax = "";
if (current.getMain().getTemp_max() != null) {
double conversion = (Double) current.getMain().getTemp_max();
picture = BitmapFactory.decodeResource(this.getResources(),
R.drawable.weather_severe_alert);
}
- final CurrentDataEntryFirst entryFirst = new CurrentDataEntryFirst(tempMax,
- tempMin, picture);
- adapter.add(entryFirst);
+ // TODO: static resource
String description = "no description available";
if (current.getWeather().size() > 0) {
description = current.getWeather().get(0).getDescription();
}
- final CurrentDataEntrySecond entrySecond = new CurrentDataEntrySecond(
- description);
- adapter.add(entrySecond);
+ // TODO: units!!!!
String humidityValue = "";
if ((current.getMain() != null)
&& (current.getMain().getHumidity() != null)) {
final Date unixDate = new Date(unixTime * 1000L);
sunSetTime = dateFormat.format(unixDate);
}
- final CurrentDataEntryFifth entryFifth = new CurrentDataEntryFifth(
- sunRiseTime, sunSetTime, humidityValue, pressureValue, windValue, rainValue,
- feelsLike, symbol, snowValue, cloudsValue);
- adapter.add(entryFifth);
// 4. Update UI.
- // TODO: Why am I not doing the same as in OverviewFragment?
- this.setListAdapter(adapter);
+ final TextView tempMaxView = (TextView) getActivity().findViewById(R.id.weather_current_temp_max);
+ tempMaxView.setText(tempMax);
+ final TextView tempMinView = (TextView) getActivity().findViewById(R.id.weather_current_temp_min);
+ tempMinView.setText(tempMin);
+ final ImageView pictureView = (ImageView) getActivity().findViewById(R.id.weather_current_picture);
+ pictureView.setImageBitmap(picture);
+
+ final TextView descriptionView = (TextView) getActivity().findViewById(R.id.weather_specific_description);
+ descriptionView.setText(description);
+
+ final TextView humidityValueView = (TextView) getActivity().findViewById(R.id.weather_current_humidity_value);
+ humidityValueView.setText(humidityValue);
+ final TextView pressureValueView = (TextView) getActivity().findViewById(R.id.weather_current_pressure_value);
+ pressureValueView.setText(pressureValue);
+ final TextView windValueView = (TextView) getActivity().findViewById(R.id.weather_current_wind_value);
+ windValueView.setText(windValue);
+ final TextView rainValueView = (TextView) getActivity().findViewById(R.id.weather_current_rain_value);
+ rainValueView.setText(rainValue);
+ final TextView cloudsValueView = (TextView) getActivity().findViewById(R.id.weather_current_clouds_value);
+ cloudsValueView.setText(cloudsValue);
+ final TextView snowValueView = (TextView) getActivity().findViewById(R.id.weather_current_snow_value);
+ snowValueView.setText(snowValue);
+ final TextView feelsLikeView = (TextView) getActivity().findViewById(R.id.weather_current_feelslike_value);
+ feelsLikeView.setText(feelsLike);
+
+ final TextView sunRiseTimeView = (TextView) getActivity().findViewById(R.id.weather_current_sunrise_value);
+ sunRiseTimeView.setText(sunRiseTime);
+ final TextView sunSetTimeView = (TextView) getActivity().findViewById(R.id.weather_current_sunset_value);
+ sunSetTimeView.setText(sunSetTime);
}
private class CurrentTask extends AsyncTask<GeocodingData, Void, Current> {
}
this.mChosenDay = savedInstanceState.getInt("Chosen day");
- // TODO: Why don't I need mListState?
}
}
if (forecast.getWeather().size() > 0) {
description = forecast.getWeather().get(0).getDescription();
}
- final TextView descriptionView = (TextView) getActivity().findViewById(R.id.weather_specific_description);
- descriptionView.setText(description);
// TODO: units!!!!
String humidityValue = "";
final ImageView pictureView = (ImageView) getActivity().findViewById(R.id.weather_specific_picture);
pictureView.setImageBitmap(picture);
+ final TextView descriptionView = (TextView) getActivity().findViewById(R.id.weather_specific_description);
+ descriptionView.setText(description);
+
final TextView humidityValueView = (TextView) getActivity().findViewById(R.id.weather_specific_humidity_value);
humidityValueView.setText(humidityValue);
final TextView pressureValueView = (TextView) getActivity().findViewById(R.id.weather_specific_pressure_value);