No time for comments
authorgu.martinm@gmail.com <gu.martinm@gmail.com>
Sun, 20 Apr 2014 03:57:08 +0000 (05:57 +0200)
committergu.martinm@gmail.com <gu.martinm@gmail.com>
Sun, 20 Apr 2014 03:57:08 +0000 (05:57 +0200)
27 files changed:
Android/WeatherInformation/AndroidManifest.xml
Android/WeatherInformation/res/drawable-hdpi/ic_action_map.png [new file with mode: 0644]
Android/WeatherInformation/res/drawable-mdpi/ic_action_map.png [new file with mode: 0644]
Android/WeatherInformation/res/drawable-xhdpi/ic_action_map.png [new file with mode: 0644]
Android/WeatherInformation/res/drawable-xxhdpi/ic_action_map.png [new file with mode: 0644]
Android/WeatherInformation/res/layout/activity_test_scroll.xml [deleted file]
Android/WeatherInformation/res/layout/fragment_test_scroll.xml [deleted file]
Android/WeatherInformation/res/layout/weather_current_data_entry_first.xml [new file with mode: 0644]
Android/WeatherInformation/res/layout/weather_current_data_entry_fourth.xml [new file with mode: 0644]
Android/WeatherInformation/res/layout/weather_current_data_entry_second.xml [new file with mode: 0644]
Android/WeatherInformation/res/layout/weather_current_data_entry_third.xml [new file with mode: 0644]
Android/WeatherInformation/res/layout/weather_main_entry_list.xml
Android/WeatherInformation/res/layout/weather_specific_data.xml
Android/WeatherInformation/res/menu/test_scroll.xml [deleted file]
Android/WeatherInformation/res/menu/weather_main_menu.xml
Android/WeatherInformation/res/values/strings.xml
Android/WeatherInformation/src/de/example/exampletdd/TestScrollActivity.java [deleted file]
Android/WeatherInformation/src/de/example/exampletdd/WeatherInformationActivity.java
Android/WeatherInformation/src/de/example/exampletdd/WeatherInformationCurrentDataActivity.java
Android/WeatherInformation/src/de/example/exampletdd/fragment/current/WeatherInformationCurrentDataFragment.java
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataAdapter.java [new file with mode: 0644]
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFirst.java [new file with mode: 0644]
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFourth.java [new file with mode: 0644]
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntrySecond.java [new file with mode: 0644]
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryThird.java [new file with mode: 0644]
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherInformationSpecificDataFragment.java
Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherSpecificDataAdapter.java

index 8b5e56e..bcfb02b 100644 (file)
             android:value="@integer/google_play_services_version" />
 
         <activity
-            android:name="de.example.exampletdd.TestScrollActivity"
-            android:label="@string/title_activity_test_scroll"
-            android:parentActivityName="de.example.exampletdd.WeatherInformationActivity" >
-        </activity>
-        <activity
             android:name="de.example.exampletdd.MasterDetailListActivity"
             android:label="@string/title_masterdetail_list" >
         </activity>
diff --git a/Android/WeatherInformation/res/drawable-hdpi/ic_action_map.png b/Android/WeatherInformation/res/drawable-hdpi/ic_action_map.png
new file mode 100644 (file)
index 0000000..370cf5c
Binary files /dev/null and b/Android/WeatherInformation/res/drawable-hdpi/ic_action_map.png differ
diff --git a/Android/WeatherInformation/res/drawable-mdpi/ic_action_map.png b/Android/WeatherInformation/res/drawable-mdpi/ic_action_map.png
new file mode 100644 (file)
index 0000000..50a9100
Binary files /dev/null and b/Android/WeatherInformation/res/drawable-mdpi/ic_action_map.png differ
diff --git a/Android/WeatherInformation/res/drawable-xhdpi/ic_action_map.png b/Android/WeatherInformation/res/drawable-xhdpi/ic_action_map.png
new file mode 100644 (file)
index 0000000..537c5a4
Binary files /dev/null and b/Android/WeatherInformation/res/drawable-xhdpi/ic_action_map.png differ
diff --git a/Android/WeatherInformation/res/drawable-xxhdpi/ic_action_map.png b/Android/WeatherInformation/res/drawable-xxhdpi/ic_action_map.png
new file mode 100644 (file)
index 0000000..ed72ce9
Binary files /dev/null and b/Android/WeatherInformation/res/drawable-xxhdpi/ic_action_map.png differ
diff --git a/Android/WeatherInformation/res/layout/activity_test_scroll.xml b/Android/WeatherInformation/res/layout/activity_test_scroll.xml
deleted file mode 100644 (file)
index 5ad3eba..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/container"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="de.example.exampletdd.TestScrollActivity"
-    tools:ignore="MergeRootFrame" >
-  
-    
-  <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_gravity="top|center"
-        android:orientation="horizontal">
-        
-        <ImageView
-        android:id="@+id/weather_current_picture"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="top|center"
-        android:layout_centerHorizontal="true"
-        android:contentDescription="@string/icon_weather_description"
-        android:maxHeight="380dp"
-        android:maxWidth="380dp"
-        android:minHeight="180dp"
-        android:minWidth="180dp"
-        android:src="@drawable/weather_snow" />
-        
-        <!-- Temperature Max-->
-            <TextView
-                android:id="@+id/weather_max_temperature"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="55ºC"
-                android:textAlignment="center"
-                android:layout_toRightOf="@id/weather_current_picture"
-                android:layout_alignTop="@id/weather_current_picture"
-                android:layout_margin="10dp"
-                android:layout_gravity="top|center"
-        android:layout_centerHorizontal="true"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:textStyle="bold" />
-
-            <!-- Temperature Min-->
-            <TextView
-                android:id="@+id/weather_min_temperature"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="55ºC"
-                android:textAlignment="center"
-                android:layout_toRightOf="@id/weather_current_picture"
-                android:layout_below="@+id/weather_max_temperature"
-                android:layout_margin="10dp"
-                android:layout_gravity="top|center"
-                android:layout_centerHorizontal="true"
-                android:textAppearance="?android:attr/textAppearanceMedium" />
-        
-        <!-- Weather description-->
-        <TextView
-            android:id="@+id/weather_description"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:gravity="center"
-            android:text="Light rain"
-            android:textAlignment="center"
-            android:textColor="@color/weather_time_of_day_color_title"
-            android:layout_below="@+id/weather_current_picture"
-            android:layout_margin="5dp"
-            android:textStyle="bold"
-            android:textAppearance="?android:attr/textAppearanceLarge" />              
-        
-
-   
-   
-        
-      <!-- Humidity -->
-            <TextView
-                android:id="@+id/weather_humidity"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="HUMIDITY"
-                android:gravity="left"
-                android:layout_alignParentLeft="true"
-                android:textAlignment="center"
-                android:layout_below="@+id/weather_description"
-                android:layout_margin="10dp"
-                android:textAppearance="?android:attr/textAppearanceSmall" />
-            
-            <!-- Wind -->
-            <TextView
-                android:id="@+id/weather_wind"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="WIND"
-                android:gravity="right"
-                android:layout_alignParentRight="true"
-                android:layout_below="@+id/weather_description"
-                android:layout_toRightOf="@id/weather_humidity"
-                android:textAlignment="center"
-                android:layout_margin="10dp"
-                android:textAppearance="?android:attr/textAppearanceSmall" />    
-                
-            <!-- Pressure -->
-            <TextView
-                android:id="@+id/weather_pressure"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="PRESSURE"
-                android:gravity="left"
-                android:layout_alignParentLeft="true"
-                android:textAlignment="center"
-                android:layout_below="@+id/weather_humidity"
-                android:layout_margin="10dp"
-                android:textAppearance="?android:attr/textAppearanceSmall" />
-            
-            <!-- Rain -->
-            <TextView
-                android:id="@+id/weather_rain"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="RAIN"
-                android:gravity="right"
-                android:layout_alignParentRight="true"
-                android:layout_below="@+id/weather_wind"
-                android:layout_toRightOf="@id/weather_humidity"
-                android:textAlignment="center"
-                android:layout_margin="10dp"
-                android:textAppearance="?android:attr/textAppearanceSmall" />  
-
-     </RelativeLayout>
-  
-  <HorizontalScrollView
-        android:layout_width="fill_parent"
-        android:layout_gravity="bottom"
-        android:layout_height="150dp" >
-
-        <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">
-
-                <!-- Thermometer -->
-                <ImageView
-                    android:id="@+id/thermometer"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:layout_below="@+id/weather_morn"
-                    android:layout_alignParentLeft="true"
-                    android:orientation="vertical"
-                    android:contentDescription="Image"
-                    android:src="@drawable/thermometer"
-                    android:background="?android:attr/activatedBackgroundIndicator"/>
-
-                <!-- 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_toRightOf="@id/thermometer"
-                    android:layout_alignTop="@id/thermometer"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:textStyle="bold" />
-
-                <!-- Time of day -->
-
-                <TextView
-                    android:id="@+id/weather_morn"
-                    android:layout_width="140dp"
-                    android:layout_height="wrap_content"
-                    android:layout_alignParentTop="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/textAppearanceLarge" />
-
-            </RelativeLayout>
-
-
-            <RelativeLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
-
-                <!-- Thermometer -->
-                <ImageView
-                    android:id="@+id/thermometer"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:layout_below="@+id/weather_morn"
-                    android:layout_alignParentLeft="true"
-                    android:orientation="vertical"
-                    android:contentDescription="Image"
-                    android:src="@drawable/thermometer"
-                    android:background="?android:attr/activatedBackgroundIndicator"/>
-
-                <!-- 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_toRightOf="@id/thermometer"
-                    android:layout_alignTop="@id/thermometer"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    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:textAppearance="?android:attr/textAppearanceLarge" />
-
-            </RelativeLayout>
-
-
-            <RelativeLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
-
-                <!-- Thermometer -->
-                <ImageView
-                    android:id="@+id/thermometer"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:layout_below="@+id/weather_morn"
-                    android:layout_alignParentLeft="true"
-                    android:orientation="vertical"
-                    android:contentDescription="Image"
-                    android:src="@drawable/thermometer"
-                    android:background="?android:attr/activatedBackgroundIndicator"/>
-
-                <!-- 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_toRightOf="@id/thermometer"
-                    android:layout_alignTop="@id/thermometer"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:textStyle="bold" />
-
-                <!-- Time of day -->
-                <TextView
-                    android:id="@+id/weather_morn"
-                    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:gravity="center"
-                    android:layout_alignParentTop="true"
-                    android:textAppearance="?android:attr/textAppearanceLarge" />
-
-            </RelativeLayout>
-
-
-            <RelativeLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
-
-                <!-- Thermometer -->
-                <ImageView
-                    android:id="@+id/thermometer"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:layout_below="@+id/weather_morn"
-                    android:layout_alignParentLeft="true"
-                    android:orientation="vertical"
-                    android:contentDescription="Image"
-                    android:src="@drawable/thermometer"
-                    android:background="?android:attr/activatedBackgroundIndicator"/>
-
-                <!-- 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_toRightOf="@id/thermometer"
-                    android:layout_alignTop="@id/thermometer"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:textStyle="bold" />
-
-                <!-- Time of day -->
-                <TextView
-                    android:id="@+id/weather_morn"
-                    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:textAppearance="?android:attr/textAppearanceLarge" />
-
-            </RelativeLayout>
-            
-        </LinearLayout>
-    </HorizontalScrollView>
-    
-</FrameLayout>
\ No newline at end of file
diff --git a/Android/WeatherInformation/res/layout/fragment_test_scroll.xml b/Android/WeatherInformation/res/layout/fragment_test_scroll.xml
deleted file mode 100644 (file)
index cccb845..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    tools:context="de.example.exampletdd.TestScrollActivity$PlaceholderFragment" >
-
-    <TextView
-        android:id="@+id/section_label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
-
-</RelativeLayout>
diff --git a/Android/WeatherInformation/res/layout/weather_current_data_entry_first.xml b/Android/WeatherInformation/res/layout/weather_current_data_entry_first.xml
new file mode 100644 (file)
index 0000000..bbfb715
--- /dev/null
@@ -0,0 +1,51 @@
+<?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>
diff --git a/Android/WeatherInformation/res/layout/weather_current_data_entry_fourth.xml b/Android/WeatherInformation/res/layout/weather_current_data_entry_fourth.xml
new file mode 100644 (file)
index 0000000..19d3488
--- /dev/null
@@ -0,0 +1,200 @@
+<?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="80dp" >
+    
+    <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">
+
+                <!-- Thermometer -->
+                <ImageView
+                    android:id="@+id/thermometer_morn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="fill_parent"
+                    android:layout_below="@+id/weather_morn"
+                    android:layout_alignParentLeft="true"
+                    android:orientation="vertical"
+                    android:contentDescription="Image"
+                    android:src="@drawable/thermometer"
+                    android:background="?android:attr/activatedBackgroundIndicator"/>
+
+                <!-- 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_toRightOf="@id/thermometer_morn"
+                    android:layout_alignTop="@id/thermometer_morn"
+                    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:textAppearance="?android:attr/textAppearanceMedium" />
+
+            </RelativeLayout>
+        
+        <RelativeLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+            
+            <!-- Thermometer -->
+            <ImageView
+                android:id="@+id/thermometer_day"
+                android:layout_width="wrap_content"
+                android:layout_height="fill_parent"
+                android:layout_below="@+id/weather_day"
+                android:layout_alignParentLeft="true"
+                android:orientation="vertical"
+                android:contentDescription="Image"
+                android:src="@drawable/thermometer"
+                android:background="?android:attr/activatedBackgroundIndicator"/>
+            
+            <!-- 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_toRightOf="@id/thermometer_day"
+                 android:layout_alignTop="@id/thermometer_day"
+                 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: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">
+
+                <!-- Thermometer -->
+                <ImageView
+                    android:id="@+id/thermometer_eve"
+                    android:layout_width="wrap_content"
+                    android:layout_height="fill_parent"
+                    android:layout_below="@+id/weather_eve"
+                    android:layout_alignParentLeft="true"
+                    android:orientation="vertical"
+                    android:contentDescription="Image"
+                    android:src="@drawable/thermometer"
+                    android:background="?android:attr/activatedBackgroundIndicator"/>
+
+                <!-- 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_toRightOf="@id/thermometer_eve"
+                    android:layout_alignTop="@id/thermometer_eve"
+                    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: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">
+
+                <!-- Thermometer -->
+                <ImageView
+                    android:id="@+id/thermometer_night"
+                    android:layout_width="wrap_content"
+                    android:layout_height="fill_parent"
+                    android:layout_below="@+id/weather_night"
+                    android:layout_alignParentLeft="true"
+                    android:orientation="vertical"
+                    android:contentDescription="Image"
+                    android:src="@drawable/thermometer"
+                    android:background="?android:attr/activatedBackgroundIndicator"/>
+
+                <!-- 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_toRightOf="@id/thermometer_night"
+                    android:layout_alignTop="@id/thermometer_night"
+                    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:textAppearance="?android:attr/textAppearanceMedium" />
+
+            </RelativeLayout>
+            
+        </LinearLayout>
+      
+</HorizontalScrollView>
diff --git a/Android/WeatherInformation/res/layout/weather_current_data_entry_second.xml b/Android/WeatherInformation/res/layout/weather_current_data_entry_second.xml
new file mode 100644 (file)
index 0000000..7c2fa49
--- /dev/null
@@ -0,0 +1,24 @@
+<?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>
diff --git a/Android/WeatherInformation/res/layout/weather_current_data_entry_third.xml b/Android/WeatherInformation/res/layout/weather_current_data_entry_third.xml
new file mode 100644 (file)
index 0000000..9f7094c
--- /dev/null
@@ -0,0 +1,271 @@
+<?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" >
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:padding="20dp"
+        android:orientation="vertical" >
+
+        <!-- Humidity -->
+        <TextView
+            android:id="@+id/weather_current_data_humidity"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="HUMIDITY"
+            android:layout_gravity="left"
+            android:gravity="left"
+            android:layout_alignParentLeft="true"
+            android:textAlignment="center"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:layout_margin="5dp"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            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:layout_toRightOf="@+id/weather_current_data_humidity"
+            android:textAlignment="center"
+            android:layout_marginTop="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="center"
+            android:layout_toRightOf="@+id/weather_current_data_humidity_value"
+            android:paddingTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="bold" />
+            
+        <!-- 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:layout_alignParentRight="true"
+            android:textAlignment="center"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:layout_margin="5dp"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textStyle="bold" />
+        
+        <!-- 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:layout_toLeftOf="@+id/weather_current_data_wind"
+            android:textAlignment="center"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            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:layout_toLeftOf="@+id/weather_current_data_wind_units"
+            android:textAlignment="center"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="normal" />
+        
+       
+        
+    </RelativeLayout>
+    
+    
+        <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:padding="20dp"
+        android:orientation="vertical" >
+        
+        <!-- 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:layout_alignParentLeft="true"
+            android:textAlignment="center"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            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:textAlignment="center"
+            android:layout_toRightOf="@+id/weather_current_data_rain"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="5dp"
+            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:textAlignment="center"
+            android:layout_toRightOf="@+id/weather_current_data_rain_value"
+            android:paddingTop="20dp"
+            android:paddingRight="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="bold" />
+        
+        
+        <!-- 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:layout_alignParentRight="true"
+            android:textAlignment="center"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:layout_margin="5dp"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textStyle="bold" />
+        
+        <!-- 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:layout_toLeftOf="@+id/weather_current_data_clouds"
+            android:textAlignment="center"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            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:gravity="right"
+            android:layout_toLeftOf="@+id/weather_current_data_clouds_units"
+            android:textAlignment="center"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="normal" />
+        
+     </RelativeLayout>
+    
+    <LinearLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:layout_gravity="center"
+    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="center"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:paddingTop="20dp"
+            android:paddingLeft="20dp"
+            android:paddingBottom="20dp"
+            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="center"
+            android:paddingTop="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="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="center"
+            android:paddingTop="20dp"
+            android:paddingRight="20dp"
+            android:paddingBottom="20dp"
+            android:layout_marginTop="5dp"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textStyle="bold" />
+        
+     </LinearLayout>
+</LinearLayout>
index f11a2ac..017f8d0 100644 (file)
@@ -1,70 +1,96 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:baselineAligned="false"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:padding="15dp"
+    android:layout_gravity="center_horizontal"
+    android:orientation="horizontal"
+    android:padding="5dp" >
+
+    <LinearLayout
+    android:layout_width="0dp"
+    android:layout_weight="1"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:layout_gravity="center"
     android:orientation="vertical" >
 
     <TextView
         android:id="@+id/weather_main_entry_date_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_above="@+id/weather_main_entry_date_number"
-        android:layout_alignParentLeft="true"
-        android:layout_alignBottom="@+id/weather_main_entry_temperature_max"
-        android:layout_alignTop="@+id/weather_main_entry_temperature_max"
+        android:layout_gravity="center"
         android:text="SUN"
         android:textAlignment="center"
         android:textAllCaps="true"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:textStyle="bold" />
+
     <TextView
         android:id="@+id/weather_main_entry_date_number"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignBottom="@+id/weather_main_entry_temperature_min"
-        android:layout_alignParentLeft="true"
-        android:layout_alignTop="@+id/weather_main_entry_temperature_min"
+        android:layout_gravity="center"
         android:text="APR 23"
         android:textAlignment="center"
         android:textAllCaps="true"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:textStyle="normal" />
+    
+    </LinearLayout>
+    
 
-    <TextView
-        android:id="@+id/weather_main_entry_temperature_max"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignTop="@+id/weather_main_entry_image"
-        android:layout_centerHorizontal="true"
-        android:text="12ºC"
-        android:textAlignment="center"
-        android:textAllCaps="true"
-        android:textColor="@color/weather_time_of_day_color_title"
-        android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textStyle="bold" />
+    <LinearLayout
+    android:layout_width="0dp"
+    android:layout_weight="1"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:layout_gravity="center"
+    android:orientation="vertical" >
+    
+        <TextView
+            android:id="@+id/weather_main_entry_temperature_max"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:text="12ºC"
+            android:textAlignment="center"
+            android:textAllCaps="true"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="@color/weather_time_of_day_color_title"
+            android:textStyle="bold" />
     
     <TextView
         android:id="@+id/weather_main_entry_temperature_min"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_below="@+id/weather_main_entry_temperature_max"
-        android:layout_alignBottom="@+id/weather_main_entry_image"
-        android:layout_centerHorizontal="true"
+        android:layout_gravity="center"
         android:text="5ºC"
         android:textAlignment="center"
         android:textAllCaps="true"
-        android:textColor="@color/weather_time_of_day_color_title"
         android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="@color/weather_time_of_day_color_title"
         android:textStyle="normal" />
     
+    </LinearLayout>
+    
+    <LinearLayout
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_gravity="center"
+        android:layout_weight="1"
+        android:gravity="center"
+        android:orientation="vertical" >
+    
     <ImageView
         android:id="@+id/weather_main_entry_image"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
+        android:layout_gravity="center"
         android:contentDescription="@string/icon_weather_description"
         android:orientation="vertical"
         android:src="@drawable/ic_launcher" />
+    
+    </LinearLayout>
 
-</RelativeLayout>
\ No newline at end of file
+</LinearLayout>
\ No newline at end of file
index e6a25e5..2e0d4fe 100644 (file)
@@ -9,13 +9,6 @@
     tools:context="de.example.exampletdd.WeatherInformationSpecificDataActivity"
     tools:ignore="MergeRootFrame" >
 
-    <ImageView
-        android:id="@+id/weather_specific_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" />
 
      <fragment
         android:id="@+id/weather_specific_data_fragment"
diff --git a/Android/WeatherInformation/res/menu/test_scroll.xml b/Android/WeatherInformation/res/menu/test_scroll.xml
deleted file mode 100644 (file)
index 3a15165..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    tools:context="de.example.exampletdd.TestScrollActivity" >
-
-    <item
-        android:id="@+id/action_settings"
-        android:orderInCategory="100"
-        android:showAsAction="never"
-        android:title="@string/action_settings"/>
-
-</menu>
index e2c28f0..26ff96f 100644 (file)
@@ -28,7 +28,7 @@
     </item>
     <item
         android:id="@+id/weather_menu_map"
-        android:icon="@drawable/ic_action_place"
+        android:icon="@drawable/ic_action_map"
         android:showAsAction="ifRoom"
         android:visible="true"
         android:checkable="false"
index b6355fd..4beeadf 100644 (file)
@@ -47,7 +47,6 @@
     <string name="country_not_found">country not found</string>
     <string name="progress_dialog_get_remote_data">Downloading remote data</string>
     <string name="progress_dialog_generic_message">Please wait&#8230;</string>
-    <string name="title_activity_test_scroll">TestScrollActivity</string>
     <string name="title_section1">Section 1</string>
     <string name="title_section2">Section 2</string>
     <string name="title_section3">Section 3</string>
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/TestScrollActivity.java b/Android/WeatherInformation/src/de/example/exampletdd/TestScrollActivity.java
deleted file mode 100644 (file)
index b894a94..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-package de.example.exampletdd;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.app.Fragment;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.TextView;
-
-public class TestScrollActivity extends Activity implements ActionBar.OnNavigationListener {
-
-    /**
-     * The serialization (saved instance state) Bundle key representing the
-     * current dropdown position.
-     */
-    private static final String STATE_SELECTED_NAVIGATION_ITEM = "selected_navigation_item";
-
-    @Override
-    protected void onCreate(final Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        this.setContentView(R.layout.activity_test_scroll);
-
-        // Set up the action bar to show a dropdown list.
-        final ActionBar actionBar = this.getActionBar();
-        actionBar.setDisplayShowTitleEnabled(false);
-        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
-
-        // Set up the dropdown list navigation in the action bar.
-        actionBar.setListNavigationCallbacks(
-                // Specify a SpinnerAdapter to populate the dropdown list.
-                new ArrayAdapter<String>(actionBar.getThemedContext(),
-                        android.R.layout.simple_list_item_1, android.R.id.text1, new String[] {
-                    this.getString(R.string.title_section1),
-                    this.getString(R.string.title_section2),
-                    this.getString(R.string.title_section3), }), this);
-    }
-
-    @Override
-    public void onRestoreInstanceState(final Bundle savedInstanceState) {
-        // Restore the previously serialized current dropdown position.
-        if (savedInstanceState.containsKey(STATE_SELECTED_NAVIGATION_ITEM)) {
-            this.getActionBar().setSelectedNavigationItem(
-                    savedInstanceState.getInt(STATE_SELECTED_NAVIGATION_ITEM));
-        }
-    }
-
-    @Override
-    public void onSaveInstanceState(final Bundle outState) {
-        // Serialize the current dropdown position.
-        outState.putInt(STATE_SELECTED_NAVIGATION_ITEM, this.getActionBar().getSelectedNavigationIndex());
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(final Menu menu) {
-
-        // Inflate the menu; this adds items to the action bar if it is present.
-        this.getMenuInflater().inflate(R.menu.test_scroll, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(final MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        final int id = item.getItemId();
-        if (id == R.id.action_settings) {
-            return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    @Override
-    public boolean onNavigationItemSelected(final int position, final long id) {
-        // When the given dropdown item is selected, show its contents in the
-        // container view.
-        // getFragmentManager().beginTransaction()
-        // .replace(R.id.container, PlaceholderFragment.newInstance(position +
-        // 1)).commit();
-        return true;
-    }
-
-    /**
-     * A placeholder fragment containing a simple view.
-     */
-    public static class PlaceholderFragment extends Fragment {
-        /**
-         * The fragment argument representing the section number for this
-         * fragment.
-         */
-        private static final String ARG_SECTION_NUMBER = "section_number";
-
-        /**
-         * Returns a new instance of this fragment for the given section number.
-         */
-        public static PlaceholderFragment newInstance(final int sectionNumber) {
-            final PlaceholderFragment fragment = new PlaceholderFragment();
-            final Bundle args = new Bundle();
-            args.putInt(ARG_SECTION_NUMBER, sectionNumber);
-            fragment.setArguments(args);
-            return fragment;
-        }
-
-        public PlaceholderFragment() {
-        }
-
-        @Override
-        public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
-                final Bundle savedInstanceState) {
-            final View rootView = inflater.inflate(R.layout.fragment_test_scroll, container, false);
-            final TextView textView = (TextView) rootView.findViewById(R.id.section_label);
-            textView.setText(Integer.toString(this.getArguments().getInt(ARG_SECTION_NUMBER)));
-            return rootView;
-        }
-    }
-
-}
index b45a6ff..de41348 100644 (file)
@@ -79,7 +79,7 @@ public class WeatherInformationActivity extends Activity {
         } else if (itemId == R.id.weather_menu_current) {
             intent = new Intent("de.example.exampletdd.WEATHERINFO")
             .setComponent(new ComponentName("de.example.exampletdd",
-                    "de.example.exampletdd.TestScrollActivity"));
+                    "de.example.exampletdd.WeatherInformationCurrentDataActivity"));
             this.startActivity(intent);
             return true;
         } else {
index 834f705..4fd78f8 100644 (file)
@@ -37,8 +37,8 @@ public class WeatherInformationCurrentDataActivity extends Activity {
                     .getString(R.string.city_not_found) : geocodingData.getCity();
                     final String country = (geocodingData.getCountry() == null) ? this
                             .getString(R.string.country_not_found) : geocodingData.getCountry();
-                            actionBar.setTitle("Current weather data information");
-                            actionBar.setSubtitle(city + "," + country);
+                            actionBar.setTitle(city + "," + country);
+                            actionBar.setSubtitle("CURRENTLY");
         }
 
     }
index b122d8f..0fbe153 100644 (file)
@@ -52,13 +52,6 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
     public void onCreate(final Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        // final SharedPreferences sharedPreferences = PreferenceManager
-        // .getDefaultSharedPreferences(this.getActivity());
-        // final String keyPreference = this.getResources().getString(
-        // R.string.weather_preferences_language_key);
-        // this.mLanguage = sharedPreferences.getString(
-        // keyPreference, "");
-
         this.mWeatherServicePersistenceFile = new WeatherServicePersistenceFile(this.getActivity());
         this.mWeatherServicePersistenceFile.removeCurrentWeatherData();
     }
@@ -88,16 +81,9 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
 
         this.setHasOptionsMenu(false);
 
-        final WeatherSpecificDataAdapter adapter = new WeatherSpecificDataAdapter(
-                this.getActivity(), R.layout.weather_data_entry_list);
-
-
         this.setEmptyText("No data available");
 
-        this.setListAdapter(adapter);
-        this.setListShown(true);
-        this.setListShownNoAnimation(true);
-
+        this.setListShownNoAnimation(false);
     }
 
     @Override
@@ -125,28 +111,9 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
         if (currentWeatherData != null) {
             this.updateCurrentWeatherData(currentWeatherData);
         } else {
-            // 2.1 Empty list by default
-            final WeatherSpecificDataAdapter adapter = new WeatherSpecificDataAdapter(
-                    this.getActivity(), R.layout.weather_data_entry_list);
-            this.setListAdapter(adapter);
-
-            // 2.2. Try to update weather data on display with remote
-            // information.
+            // 3. Try to update weather data on display with remote
             this.getRemoteCurrentWeatherInformation();
         }
-
-
-
-        // 3. If language changed, try to retrieve new data for new language
-        // (new strings with the chosen language)
-        // keyPreference = this.getResources().getString(
-        // R.string.weather_preferences_language_key);
-        // final String languagePreferenceValue = sharedPreferences.getString(
-        // keyPreference, "");
-        // if (!languagePreferenceValue.equals(this.mLanguage)) {
-        // this.mLanguage = languagePreferenceValue;
-        // this.getWeather();
-        // }
     }
 
     @Override
@@ -297,6 +264,7 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
                 try {
                     this.onPostExecuteThrowable(currentWeatherData);
                 } catch (final IOException e) {
+                    WeatherInformationCurrentDataFragment.this.setListShown(true);
                     Log.e(TAG, "WeatherTask onPostExecute exception: ", e);
                     final DialogFragment newFragment = ErrorDialogFragment
                             .newInstance(R.string.error_dialog_generic_error);
@@ -305,6 +273,7 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
                             "errorDialog");
                 }
             } else {
+                WeatherInformationCurrentDataFragment.this.setListShown(true);
                 final DialogFragment newFragment = ErrorDialogFragment
                         .newInstance(R.string.error_dialog_generic_error);
                 newFragment.show(WeatherInformationCurrentDataFragment.this.getFragmentManager(),
@@ -325,16 +294,6 @@ public class WeatherInformationCurrentDataFragment extends ListFragment {
         private CurrentWeatherData doInBackgroundThrowable(final Object... params)
                 throws ClientProtocolException, MalformedURLException, URISyntaxException,
                 JsonParseException, IOException {
-            // final SharedPreferences sharedPreferences = PreferenceManager
-            // .getDefaultSharedPreferences(WeatherInformationCurrentDataFragment.this
-            // .getActivity());
-            //
-            // final String keyPreference =
-            // WeatherInformationCurrentDataFragment.this
-            // .getActivity().getString(
-            // R.string.weather_preferences_language_key);
-            // final String languagePreferenceValue =
-            // sharedPreferences.getString(keyPreference, "");
 
             // 1. Coordinates
             final GeocodingData geocodingData = (GeocodingData) params[0];
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataAdapter.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataAdapter.java
new file mode 100644 (file)
index 0000000..e118a3c
--- /dev/null
@@ -0,0 +1,223 @@
+package de.example.exampletdd.fragment.specific;
+
+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 WeatherCurrentDataAdapter extends ArrayAdapter<Object> {
+    private static final int FIRST = 0;
+    private static final int SECOND = 1;
+    private static final int THIRD = 2;
+    private static final int FOURTH = 3;
+    private final int[] resources;
+
+    public WeatherCurrentDataAdapter(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 WeatherCurrentDataEntryFirst entry = (WeatherCurrentDataEntryFirst) 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 WeatherCurrentDataEntrySecond entry = (WeatherCurrentDataEntrySecond) this
+                    .getItem(position);
+            viewHolder.weatherDescription.setText(entry.getWeatherDescription());
+        } else if (viewType == THIRD) {
+            final ViewThirdHolder viewHolder = this.getViewThirdHolder(view);
+            final WeatherCurrentDataEntryThird entry = (WeatherCurrentDataEntryThird) 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());
+        } else if (viewType == FOURTH) {
+            final ViewFourthHolder viewHolder = this.getViewFourthHolder(view);
+            final WeatherCurrentDataEntryFourth entry = (WeatherCurrentDataEntryFourth) this
+                    .getItem(position);
+            viewHolder.dayTemp.setText(entry.getDayTemp());
+            viewHolder.morningTemp.setText(entry.getEveTemp());
+            viewHolder.eveTemp.setText(entry.getEveTemp());
+            viewHolder.nightTemp.setText(entry.getNightTemp());
+        }
+
+        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;
+        } else if (position == 3) {
+            type = FOURTH;
+        }
+
+        return type;
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        return 4;
+    }
+
+    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_data_humidity_value);
+            viewHolder.pressureValue = (TextView) workingView
+                    .findViewById(R.id.weather_current_data_pressure_value);
+            viewHolder.rainValue = (TextView) workingView
+                    .findViewById(R.id.weather_current_data_rain_value);
+            viewHolder.cloudsValue = (TextView) workingView
+                    .findViewById(R.id.weather_current_data_clouds_value);
+            viewHolder.windValue = (TextView) workingView
+                    .findViewById(R.id.weather_current_data_wind_value);
+
+            workingView.setTag(viewHolder);
+
+        } else {
+            viewHolder = (ViewThirdHolder) tag;
+        }
+
+        return viewHolder;
+    }
+
+    private ViewFourthHolder getViewFourthHolder(final View workingView) {
+        final Object tag = workingView.getTag();
+        ViewFourthHolder viewHolder = null;
+
+        if ((null == tag) || !(tag instanceof ViewFourthHolder)) {
+            viewHolder = new ViewFourthHolder();
+
+            viewHolder.morningTemp = (TextView) workingView
+                    .findViewById(R.id.weather_morn_temperature);
+            viewHolder.dayTemp = (TextView) workingView.findViewById(R.id.weather_day_temperature);
+            viewHolder.eveTemp = (TextView) workingView.findViewById(R.id.weather_eve_temperature);
+            viewHolder.nightTemp = (TextView) workingView
+                    .findViewById(R.id.weather_night_temperature);
+
+            workingView.setTag(viewHolder);
+
+        } else {
+            viewHolder = (ViewFourthHolder) 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;
+    }
+
+    private static class ViewFourthHolder {
+        private TextView morningTemp;
+        private TextView dayTemp;
+        private TextView eveTemp;
+        private TextView nightTemp;
+    }
+}
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFirst.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFirst.java
new file mode 100644 (file)
index 0000000..732e682
--- /dev/null
@@ -0,0 +1,28 @@
+package de.example.exampletdd.fragment.specific;
+
+import android.graphics.Bitmap;
+
+public class WeatherCurrentDataEntryFirst {
+    private final Bitmap picture;
+    private final String tempMax;
+    private final String tempMin;
+
+    public WeatherCurrentDataEntryFirst(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;
+    }
+}
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFourth.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryFourth.java
new file mode 100644 (file)
index 0000000..4aa2e8d
--- /dev/null
@@ -0,0 +1,33 @@
+package de.example.exampletdd.fragment.specific;
+
+public class WeatherCurrentDataEntryFourth {
+    private final String morningTemp;
+    private final String dayTemp;
+    private final String eveTemp;
+    private final String nightTemp;
+
+    public WeatherCurrentDataEntryFourth(final String morningTemp, final String dayTemp,
+            final String eveTemp, final String nightTemp) {
+        this.morningTemp = morningTemp;
+        this.dayTemp = dayTemp;
+        this.eveTemp = eveTemp;
+        this.nightTemp = nightTemp;
+    }
+
+    public String getMorningTemp() {
+        return this.morningTemp;
+    }
+
+    public String getDayTemp() {
+        return this.dayTemp;
+    }
+
+    public String getEveTemp() {
+        return this.eveTemp;
+    }
+
+    public String getNightTemp() {
+        return this.nightTemp;
+    }
+
+}
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntrySecond.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntrySecond.java
new file mode 100644 (file)
index 0000000..ca6a073
--- /dev/null
@@ -0,0 +1,14 @@
+package de.example.exampletdd.fragment.specific;
+
+public class WeatherCurrentDataEntrySecond {
+    private final String weatherDescription;
+
+    public WeatherCurrentDataEntrySecond(final String weatherDescription) {
+        this.weatherDescription = weatherDescription;
+    }
+
+    public String getWeatherDescription() {
+        return this.weatherDescription;
+    }
+
+}
diff --git a/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryThird.java b/Android/WeatherInformation/src/de/example/exampletdd/fragment/specific/WeatherCurrentDataEntryThird.java
new file mode 100644 (file)
index 0000000..62d2f01
--- /dev/null
@@ -0,0 +1,39 @@
+package de.example.exampletdd.fragment.specific;
+
+public class WeatherCurrentDataEntryThird {
+    private final String humidityValue;
+    private final String pressureValue;
+    private final String windValue;
+    private final String rainValue;
+    private final String cloudsValue;
+
+    public WeatherCurrentDataEntryThird(final String humidityValue, final String pressureValue,
+            final String windValue, final String rainValue, final String cloudsValue) {
+        this.humidityValue = humidityValue;
+        this.pressureValue = pressureValue;
+        this.windValue = windValue;
+        this.rainValue = rainValue;
+        this.cloudsValue = cloudsValue;
+    }
+
+    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;
+    }
+
+}
index aecda8a..5e34202 100644 (file)
@@ -4,21 +4,22 @@ import java.io.IOException;
 import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
-import java.util.List;
 import java.util.Locale;
 
 import android.app.DialogFragment;
 import android.app.ListFragment;
 import android.content.SharedPreferences;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.widget.ListView;
 import de.example.exampletdd.R;
 import de.example.exampletdd.activityinterface.GetWeather;
 import de.example.exampletdd.fragment.ErrorDialogFragment;
+import de.example.exampletdd.fragment.overview.IconsList;
 import de.example.exampletdd.model.forecastweather.ForecastWeatherData;
 import de.example.exampletdd.service.WeatherServicePersistenceFile;
 
@@ -41,13 +42,6 @@ public class WeatherInformationSpecificDataFragment extends ListFragment impleme
 
         this.mWeatherServicePersistenceFile = new WeatherServicePersistenceFile(
                 this.getActivity());
-
-        // final SharedPreferences sharedPreferences = PreferenceManager
-        // .getDefaultSharedPreferences(this.getActivity());
-        // final String keyPreference = this.getResources().getString(
-        // R.string.weather_preferences_language_key);
-        // this.mLanguage = sharedPreferences.getString(
-        // keyPreference, "");
     }
 
     @Override
@@ -57,14 +51,9 @@ public class WeatherInformationSpecificDataFragment extends ListFragment impleme
         final ListView listWeatherView = this.getListView();
         listWeatherView.setChoiceMode(ListView.CHOICE_MODE_NONE);
 
-        final WeatherSpecificDataAdapter adapter = new WeatherSpecificDataAdapter(this.getActivity(),
-                R.layout.weather_data_entry_list);
-
         this.setEmptyText("No data available");
 
-        this.setListAdapter(adapter);
-        this.setListShown(true);
-        this.setListShownNoAnimation(true);
+        this.setListShownNoAnimation(false);
 
         if (savedInstanceState != null) {
             // Restore state
@@ -121,11 +110,16 @@ public class WeatherInformationSpecificDataFragment extends ListFragment impleme
                 .getDefault());
         tempFormatter.applyPattern("#####.#####");
         final double tempUnits = this.mIsFahrenheit ? 0 : 273.15;
+        final String symbol = this.mIsFahrenheit ? "ºF" : "ºC";
 
-        final List<WeatherSpecificDataEntry> entries = this.createEmptyEntriesList();
 
-        final WeatherSpecificDataAdapter adapter = new WeatherSpecificDataAdapter(
-                this.getActivity(), R.layout.weather_data_entry_list);
+        final int[] layouts = new int[4];
+        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_third;
+        layouts[3] = R.layout.weather_current_data_entry_fourth;
+        final WeatherCurrentDataAdapter adapter = new WeatherCurrentDataAdapter(this.getActivity(),
+                layouts);
 
 
         final de.example.exampletdd.model.forecastweather.List forecast = forecastWeatherData
@@ -138,42 +132,99 @@ public class WeatherInformationSpecificDataFragment extends ListFragment impleme
         final Date date = calendar.getTime();
         this.getActivity().getActionBar().setSubtitle(dayFormatter.format(date).toUpperCase());
 
-        if (forecast.getWeather().size() > 0) {
-            entries.set(0,
-                    new WeatherSpecificDataEntry(this.getString(R.string.text_field_description),
-                            forecast.getWeather().get(0).getDescription()));
-        }
-
-        if (forecast.getTemp().getDay() != null) {
-            double conversion = (Double) forecast.getTemp().getDay();
-            conversion = conversion - tempUnits;
-            entries.set(1, new WeatherSpecificDataEntry(this.getString(R.string.text_field_tem),
-                    tempFormatter.format(conversion)));
-        }
 
+        String tempMax = "";
         if (forecast.getTemp().getMax() != null) {
             double conversion = (Double) forecast.getTemp().getMax();
             conversion = conversion - tempUnits;
-            entries.set(2, new WeatherSpecificDataEntry(
-                    this.getString(R.string.text_field_tem_max), tempFormatter.format(conversion)));
+            tempMax = tempFormatter.format(conversion) + symbol;
         }
-
+        String tempMin = "";
         if (forecast.getTemp().getMin() != null) {
             double conversion = (Double) forecast.getTemp().getMin();
             conversion = conversion - tempUnits;
-            entries.set(3, new WeatherSpecificDataEntry(
-                    this.getString(R.string.text_field_tem_min), tempFormatter.format(conversion)));
+            tempMin = tempFormatter.format(conversion) + symbol;
+        }
+        Bitmap picture;
+        if ((forecast.getWeather().size() > 0) && (forecast.getWeather().get(0).getIcon() != null)
+                && (IconsList.getIcon(forecast.getWeather().get(0).getIcon()) != null)) {
+            final String icon = forecast.getWeather().get(0).getIcon();
+            picture = BitmapFactory.decodeResource(this.getResources(), IconsList.getIcon(icon)
+                    .getResourceDrawable());
+        } else {
+            picture = BitmapFactory.decodeResource(this.getResources(),
+                    R.drawable.weather_severe_alert);
         }
+        final WeatherCurrentDataEntryFirst entryFirst = new WeatherCurrentDataEntryFirst(tempMax,
+                tempMin, picture);
+        adapter.add(entryFirst);
 
+        String description = "no description available";
+        if (forecast.getWeather().size() > 0) {
+            description = forecast.getWeather().get(0).getDescription();
+        }
+        final WeatherCurrentDataEntrySecond entrySecond = new WeatherCurrentDataEntrySecond(
+                description);
+        adapter.add(entrySecond);
+
+
+        String humidityValue = "";
+        if (forecast.getHumidity() != null) {
+            final double conversion = (Double) forecast.getHumidity();
+            humidityValue = tempFormatter.format(conversion);
+        }
+        String pressureValue = "";
+        if (forecast.getPressure() != null) {
+            final double conversion = (Double) forecast.getPressure();
+            pressureValue = tempFormatter.format(conversion);
+        }
+        String windValue = "";
+        if (forecast.getSpeed() != null) {
+            final double conversion = (Double) forecast.getSpeed();
+            windValue = tempFormatter.format(conversion);
+        }
+        String rainValue = "";
+        if (forecast.getRain() != null) {
+            final double conversion = (Double) forecast.getRain();
+            rainValue = tempFormatter.format(conversion);
+        }
+        String cloudsValue = "";
+        if (forecast.getRain() != null) {
+            final double conversion = (Double) forecast.getClouds();
+            cloudsValue = tempFormatter.format(conversion);
+        }
+        final WeatherCurrentDataEntryThird entryThird = new WeatherCurrentDataEntryThird(
+                humidityValue, pressureValue, windValue, rainValue, cloudsValue);
+        adapter.add(entryThird);
 
-        if (forecast.getClouds() != null) {
-            final double cloudiness = (Double) forecast.getClouds();
-            entries.set(6,
-                    new WeatherSpecificDataEntry(this.getString(R.string.text_field_cloudiness),
-                            tempFormatter.format(cloudiness)));
+        String tempDay = "";
+        if (forecast.getTemp().getDay() != null) {
+            double conversion = (Double) forecast.getTemp().getDay();
+            conversion = conversion - tempUnits;
+            tempDay = tempFormatter.format(conversion) + symbol;
+        }
+        String tempMorn = "";
+        if (forecast.getTemp().getMorn() != null) {
+            double conversion = (Double) forecast.getTemp().getMorn();
+            conversion = conversion - tempUnits;
+            tempMorn = tempFormatter.format(conversion) + symbol;
+        }
+        String tempEve = "";
+        if (forecast.getTemp().getEve() != null) {
+            double conversion = (Double) forecast.getTemp().getEve();
+            conversion = conversion - tempUnits;
+            tempEve = tempFormatter.format(conversion) + symbol;
         }
+        String tempNight = "";
+        if (forecast.getTemp().getNight() != null) {
+            double conversion = (Double) forecast.getTemp().getNight();
+            conversion = conversion - tempUnits;
+            tempNight = tempFormatter.format(conversion) + symbol;
+        }
+        final WeatherCurrentDataEntryFourth entryFourth = new WeatherCurrentDataEntryFourth(
+                tempMorn, tempDay, tempEve, tempNight);
+        adapter.add(entryFourth);
 
-        adapter.addAll(entries);
         this.setListAdapter(adapter);
     }
 
@@ -198,46 +249,10 @@ public class WeatherInformationSpecificDataFragment extends ListFragment impleme
 
 
         // 2. Update weather data on display.
-
         final ForecastWeatherData forecastWeatherData = this.mWeatherServicePersistenceFile
                 .getForecastWeatherData();
         if (forecastWeatherData != null) {
             this.updateForecastWeatherData(forecastWeatherData, this.mChosenDay);
-        } else {
-            // 2.1 Empty list by default
-            final WeatherSpecificDataAdapter adapter = new WeatherSpecificDataAdapter(
-                    this.getActivity(), R.layout.weather_data_entry_list);
-            this.setListAdapter(adapter);
         }
-
-
-
-        // 3. If language changed, try to retrieve new data for new language
-        // (new strings with the chosen language)
-        // keyPreference = this.getResources().getString(
-        // R.string.weather_preferences_language_key);
-        // final String languagePreferenceValue = sharedPreferences.getString(
-        // keyPreference, "");
-        // if (!languagePreferenceValue.equals(this.mLanguage)) {
-        // this.mLanguage = languagePreferenceValue;
-        // this.getWeather();
-        // }
-    }
-
-    private List<WeatherSpecificDataEntry> createEmptyEntriesList() {
-        final List<WeatherSpecificDataEntry> entries = new ArrayList<WeatherSpecificDataEntry>();
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_description), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_tem), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_tem_max), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_tem_min), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_sun_rise), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_sun_set), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_cloudiness), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_rain_time), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_rain_amount), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_wind_speed), null));
-        entries.add(new WeatherSpecificDataEntry(this.getString(R.string.text_field_humidity), null));
-
-        return entries;
     }
 }
index 0b9491d..a354c92 100644 (file)
@@ -7,7 +7,6 @@ import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
 import android.widget.TextView;
 import de.example.exampletdd.R;
-import de.example.exampletdd.fragment.specific.WeatherSpecificDataEntry;
 
 public class WeatherSpecificDataAdapter extends ArrayAdapter<WeatherSpecificDataEntry> {
     private final int resource;